power: supply: charger-manager: Fix a NULL pointer dereference in 'charger_manager_pr...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 6 Aug 2017 22:37:55 +0000 (00:37 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Fri, 11 Aug 2017 16:53:18 +0000 (18:53 +0200)
commit096fc160b706237b6643a15a8e13690de238af0f
tree2f9c76eae99c6cdd224e7d3151bf6bc9b0d7822b
parent46cecd130d553f7340d033a4019839e9c018200d
power: supply: charger-manager: Fix a NULL pointer dereference in 'charger_manager_probe()'

'devm_kzalloc()' can return NULL. Return -ENOMEM in this case in order to
avoid a NULL pointer dereference later on.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/charger-manager.c