diff options
Diffstat (limited to 'drivers/mfd/wm8350-core.c')
-rw-r--r-- | drivers/mfd/wm8350-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index b5807484b4c..e81cc31e420 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c | |||
@@ -536,6 +536,7 @@ static int wm8350_create_cache(struct wm8350 *wm8350, int type, int mode) | |||
536 | } | 536 | } |
537 | 537 | ||
538 | out: | 538 | out: |
539 | kfree(wm8350->reg_cache); | ||
539 | return ret; | 540 | return ret; |
540 | } | 541 | } |
541 | 542 | ||
@@ -700,7 +701,7 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq, | |||
700 | 701 | ||
701 | ret = wm8350_irq_init(wm8350, irq, pdata); | 702 | ret = wm8350_irq_init(wm8350, irq, pdata); |
702 | if (ret < 0) | 703 | if (ret < 0) |
703 | goto err; | 704 | goto err_free; |
704 | 705 | ||
705 | if (wm8350->irq_base) { | 706 | if (wm8350->irq_base) { |
706 | ret = request_threaded_irq(wm8350->irq_base + | 707 | ret = request_threaded_irq(wm8350->irq_base + |
@@ -738,8 +739,9 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq, | |||
738 | 739 | ||
739 | err_irq: | 740 | err_irq: |
740 | wm8350_irq_exit(wm8350); | 741 | wm8350_irq_exit(wm8350); |
741 | err: | 742 | err_free: |
742 | kfree(wm8350->reg_cache); | 743 | kfree(wm8350->reg_cache); |
744 | err: | ||
743 | return ret; | 745 | return ret; |
744 | } | 746 | } |
745 | EXPORT_SYMBOL_GPL(wm8350_device_init); | 747 | EXPORT_SYMBOL_GPL(wm8350_device_init); |