diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-04-14 03:30:41 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-04-28 15:35:09 -0400 |
commit | b6d71fdbab9db265454e99b480081acc971dea59 (patch) | |
tree | e41da5a05d65532674f8a3b7eb07d3daeacac95f | |
parent | 9dacc6de4c0906667d704e3d6ef72dd3f15911a8 (diff) |
gpio: max730x: Remove kfree(ts) in __max730x_remove()
The memory for ts is allocated by devm_kzalloc now, so the kfree is not
required.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-max730x.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-max730x.c b/drivers/gpio/gpio-max730x.c index 8672755f95c9..0814584fcdc1 100644 --- a/drivers/gpio/gpio-max730x.c +++ b/drivers/gpio/gpio-max730x.c | |||
@@ -237,10 +237,9 @@ int __max730x_remove(struct device *dev) | |||
237 | ts->write(dev, 0x04, 0x00); | 237 | ts->write(dev, 0x04, 0x00); |
238 | 238 | ||
239 | ret = gpiochip_remove(&ts->chip); | 239 | ret = gpiochip_remove(&ts->chip); |
240 | if (!ret) { | 240 | if (!ret) |
241 | mutex_destroy(&ts->lock); | 241 | mutex_destroy(&ts->lock); |
242 | kfree(ts); | 242 | else |
243 | } else | ||
244 | dev_err(dev, "Failed to remove GPIO controller: %d\n", ret); | 243 | dev_err(dev, "Failed to remove GPIO controller: %d\n", ret); |
245 | 244 | ||
246 | return ret; | 245 | return ret; |