power: max77843_charger: fix not to check null for max77843_charger_dt_init()
authorDongwoo Lee <dwoo08.lee@samsung.com>
Tue, 16 Aug 2016 02:14:22 +0000 (11:14 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:52:28 +0000 (13:52 +0900)
In order to check error of max77843_charger_dt_init(), IS_ERR()
should be used instead of IS_ERR_OR_NULL() because it never returns
NULL.

Change-Id: Icac4e707bf269fcb40c8f7289930684c6912f048
Suggested-by: Sylwester Nawrocki <a.nawrocki@samsung.com>
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
drivers/power/max77843_charger.c

index d61907f..ed8df6f 100644 (file)
@@ -533,7 +533,7 @@ static int max77843_charger_probe(struct platform_device *pdev)
                return ret;
 
        charger->info = max77843_charger_dt_init(pdev);
-       if (IS_ERR_OR_NULL(charger->info))
+       if (IS_ERR(charger->info))
                return PTR_ERR(charger->info);