extcon: max8997: Fix NULL pointer exception on missing pdata
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Wed, 9 Apr 2014 13:20:14 +0000 (15:20 +0200)
committerJiri Slaby <jslaby@suse.cz>
Wed, 2 Jul 2014 10:06:03 +0000 (12:06 +0200)
commit7f75e8ac57444fa79191fbd108b82b383143e4ad
treec255cadbe2cdb8a730d4e609aa48b3cd65283954
parent1485b05f2a2ff688d94e5e0196133c020efa861e
extcon: max8997: Fix NULL pointer exception on missing pdata

commit dfee4111febf3d9ef3a640b2cd6205c75f4e7e3d upstream.

Fix NULL pointer exception when platform data is not supplied. The
driver dereferenced pdata pointer where it could be NULL.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: 810d601f07c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/extcon/extcon-max8997.c