serial: 8250-mtk: Fix reference leak in mtk8250_probe
authorZhang Qilong <zhangqilong3@huawei.com>
Thu, 19 Nov 2020 14:11:26 +0000 (22:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:23 +0000 (11:53 +0100)
commit048a04aa031bceaa6e211fe44626ef89ae0a92e6
tree440661d8b2fa7dba8cceed7b82859721ef5291eb
parentaf7ae245945a3eac45db5ac51aa1ae855ccf6d98
serial: 8250-mtk: Fix reference leak in mtk8250_probe

[ Upstream commit 6e4e636e0e3e0b5deffc5e233adcb2cd4e68f2d0 ]

The pm_runtime_enable will increase power disable depth.
Thus a pairing decrement is needed on the error handling
path to keep it balanced according to context.

Fixes: e32a83c70cf98 ("serial: 8250-mtk: modify mtk uart power and clock management")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201119141126.168850-1-zhangqilong3@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/8250/8250_mtk.c