Commit b6d71fdb authored by Axel Lin's avatar Axel Lin Committed by Linus Walleij

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: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarJuergen Beisert <jbe@pengutronix.de>
Reviewed-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 9dacc6de
...@@ -237,10 +237,9 @@ int __max730x_remove(struct device *dev) ...@@ -237,10 +237,9 @@ int __max730x_remove(struct device *dev)
ts->write(dev, 0x04, 0x00); ts->write(dev, 0x04, 0x00);
ret = gpiochip_remove(&ts->chip); ret = gpiochip_remove(&ts->chip);
if (!ret) { if (!ret)
mutex_destroy(&ts->lock); mutex_destroy(&ts->lock);
kfree(ts); else
} else
dev_err(dev, "Failed to remove GPIO controller: %d\n", ret); dev_err(dev, "Failed to remove GPIO controller: %d\n", ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment