[PATCH] mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error

2014-02-11 Thread Krzysztof Kozlowski
During probe the sec-core driver allocates dummy I2C device for RTC with i2c_new_dummy() but return value is not checked. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by devm_regmap_init_i2c() or

Re: [PATCH] mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error

2014-02-11 Thread Lee Jones
During probe the sec-core driver allocates dummy I2C device for RTC with i2c_new_dummy() but return value is not checked. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by devm_regmap_init_i2c() or