aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/pcf50633-charger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c
index 8772604ae1a..1bdb9906201 100644
--- a/drivers/power/pcf50633-charger.c
+++ b/drivers/power/pcf50633-charger.c
@@ -114,6 +114,9 @@ int pcf50633_mbc_get_status(struct pcf50633 *pcf)
struct pcf50633_mbc *mbc = platform_get_drvdata(pcf->mbc_pdev);
int status = 0;
+ if (!mbc)
+ return 0;
+
if (mbc->usb_online)
status |= PCF50633_MBC_USB_ONLINE;
if (mbc->usb_active)