Krzysztof Kozlowski f561b4230c gpio: max732x: Fix possible NULL pointer dereference on i2c_new_dummy error
In max732x_probe() driver allocates dummy I2C device (if number of ports
is greater than 8) with i2c_new_dummy() but it does not check the return
value of this call.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later
dereferenced by i2c_smbus_read_byte() (called from max732x_readb()).

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-03-12 14:50:51 +01:00
..
2013-10-29 18:26:14 -07:00
2013-12-12 14:28:12 +01:00
2012-11-28 11:39:59 -08:00
2013-12-04 14:48:17 +01:00
2011-06-06 10:10:11 -06:00
2013-08-16 15:24:35 +02:00
2012-11-28 11:39:33 -08:00
2014-01-21 10:09:12 -08:00
2014-01-21 10:09:12 -08:00
2013-08-16 15:24:35 +02:00
2013-08-16 15:24:35 +02:00
2013-12-09 14:04:37 +01:00
2012-11-28 11:39:59 -08:00
2013-06-17 07:47:33 +02:00
2013-12-12 14:33:14 +01:00
2014-01-08 15:07:28 +01:00
2014-03-07 09:16:27 +08:00