Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;