]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: i801: unregister tco_pdev in i801_probe() error path
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 14 Sep 2023 21:08:44 +0000 (23:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:57:02 +0000 (14:57 +0200)
commit829ff08be5663bb70aa8b21c47e514f0f53df5e1
treec42fed3f531083721ad947f85c1a72240f81586d
parent75c307d9f2fbb949cb8713b8f659fec5f21f2c34
i2c: i801: unregister tco_pdev in i801_probe() error path

commit 3914784553f68c931fc666dbe7e86fe881aada38 upstream.

We have to unregister tco_pdev also if i2c_add_adapter() fails.

Fixes: 9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs")
Cc: stable@vger.kernel.org
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-i801.c