mfd: sm501: Fix leaks in probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 11 Sep 2020 11:33:26 +0000 (14:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:07:06 +0000 (09:07 +0100)
commitdc909a96b458be2230470069eeb71fd39781d894
tree5b8cbfb1f0798ecffc7e27cb90bc8e4d5457695e
parentd5a8eeea37d34c5bec2150dfbe25cf0fef38256a
mfd: sm501: Fix leaks in probe()

[ Upstream commit 8ce24f8967df2836b4557a23e74dc4bb098249f1 ]

This code should clean up if sm501_init_dev() fails.

Fixes: b6d6454fdb66 ("[PATCH] mfd: SM501 core driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/sm501.c