sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()
authorMao Wenan <maowenan@huawei.com>
Fri, 8 Mar 2019 14:08:31 +0000 (22:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2019 07:15:18 +0000 (09:15 +0200)
commit707615f47db3e240158abe732ef4f99e01c2a91f
treefda35739b8591eb63bb088d2cf8c997ebeb9f2da
parentae35822a3ee0f9e2e86a8e878084eca7c08fa1e2
sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()

[ Upstream commit ac0cdb3d990108df795b676cd0d0e65ac34b2273 ]

Add the missing uart_unregister_driver() and i2c_del_driver() before return
from sc16is7xx_init() in the error handling case.

Signed-off-by: Mao Wenan <maowenan@huawei.com>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
drivers/tty/serial/sc16is7xx.c