提交 b6d71fdb 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@ingics.com>
Acked-by: NJuergen Beisert <jbe@pengutronix.de>
Reviewed-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 9dacc6de
......@@ -237,10 +237,9 @@ int __max730x_remove(struct device *dev)
ts->write(dev, 0x04, 0x00);
ret = gpiochip_remove(&ts->chip);
if (!ret) {
if (!ret)
mutex_destroy(&ts->lock);
kfree(ts);
} else
else
dev_err(dev, "Failed to remove GPIO controller: %d\n", ret);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册