[PATCH v2] extcon: palmas: Check the parent instance to prevent the NULL

2016-12-08 Thread Roger Quadros
extcon-palmas must be child of palmas and expects parent's drvdata to be valid. Check for non NULL parent drvdata and fail if it is NULL. Not doing so will result in a NULL pointer dereference later in the probe() parent drvdata is NULL (e.g. misplaced extcon-palmas node in device tree).

[PATCH v2] extcon: palmas: Check the parent instance to prevent the NULL

2016-12-08 Thread Roger Quadros
extcon-palmas must be child of palmas and expects parent's drvdata to be valid. Check for non NULL parent drvdata and fail if it is NULL. Not doing so will result in a NULL pointer dereference later in the probe() parent drvdata is NULL (e.g. misplaced extcon-palmas node in device tree).