]> git.baikalelectronics.ru Git - kernel.git/commit
extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered
authorYassine Oudjana <y.oudjana@protonmail.com>
Mon, 7 Nov 2022 15:33:17 +0000 (18:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Nov 2022 15:45:31 +0000 (16:45 +0100)
commit04e416ccd116e794dfbc21e34685872c960fc36c
tree711e7cd8f3694848c0f31f2545de55fc5f0eb3ab
parent438fd83a7300018ce4d3bfd4af164c4db3236cb4
extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered

Commit 3b2aef29511d ("extcon: usbc-tusb320: Add USB TYPE-C support")
added an optional Type-C interface to the driver but missed to check
if it is in use when calling the IRQ handler. This causes an oops on
devices currently using the old extcon interface. Check if a Type-C
port is registered before calling the Type-C IRQ handler.

Fixes: 3b2aef29511d ("extcon: usbc-tusb320: Add USB TYPE-C support")
Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20221107153317.657803-1-y.oudjana@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/extcon/extcon-usbc-tusb320.c