diff options
Diffstat (limited to 'drivers/power/gpio-charger.c')
-rw-r--r-- | drivers/power/gpio-charger.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c index fccbe99b619c..8458cafcd2b2 100644 --- a/drivers/power/gpio-charger.c +++ b/drivers/power/gpio-charger.c | |||
@@ -87,6 +87,10 @@ static int __devinit gpio_charger_probe(struct platform_device *pdev) | |||
87 | } | 87 | } |
88 | 88 | ||
89 | gpio_charger = kzalloc(sizeof(*gpio_charger), GFP_KERNEL); | 89 | gpio_charger = kzalloc(sizeof(*gpio_charger), GFP_KERNEL); |
90 | if (!gpio_charger) { | ||
91 | dev_err(&pdev->dev, "Failed to alloc driver structure\n"); | ||
92 | return -ENOMEM; | ||
93 | } | ||
90 | 94 | ||
91 | charger = &gpio_charger->charger; | 95 | charger = &gpio_charger->charger; |
92 | 96 | ||