power: charger-manager: Fix checking of wrong return type
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 26 Aug 2014 04:41:38 +0000 (13:41 +0900)
committerSebastian Reichel <sre@kernel.org>
Sat, 6 Sep 2014 19:02:45 +0000 (21:02 +0200)
This patch fix minor issue about checking wrong return type.

The of_cm_parse_desc() return ERR_PTR(errnor number) when some error happen
in this function. But, charger_manager_probe() has only checked whether
desc is NULL or not. If of_cm_parse_desc() returns ERR_PTR(-ENOMEM), desc
isn't NULL but desc is (void *)(-ENOMEM). Althouhg some error happen for parsing
DT, charger_manager_probe() can't detect error of desc instance.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

No differences found