Commit 55ee29d5fff18b6485543bea10620daf9e29555c

Authored by Mark Brown
Committed by Samuel Ortiz
1 parent 18bf50a374

mfd: Convert WM8350 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff

drivers/mfd/wm8350-i2c.c
... ... @@ -63,7 +63,7 @@
63 63 struct wm8350 *wm8350;
64 64 int ret = 0;
65 65  
66   - wm8350 = kzalloc(sizeof(struct wm8350), GFP_KERNEL);
  66 + wm8350 = devm_kzalloc(&i2c->dev, sizeof(struct wm8350), GFP_KERNEL);
67 67 if (wm8350 == NULL)
68 68 return -ENOMEM;
69 69  
... ... @@ -80,7 +80,6 @@
80 80 return ret;
81 81  
82 82 err:
83   - kfree(wm8350);
84 83 return ret;
85 84 }
86 85  
... ... @@ -89,7 +88,6 @@
89 88 struct wm8350 *wm8350 = i2c_get_clientdata(i2c);
90 89  
91 90 wm8350_device_exit(wm8350);
92   - kfree(wm8350);
93 91  
94 92 return 0;
95 93 }