usb: typec: Make sure an alt mode exist before getting its partner
Adding check to typec_altmode_get_partner() to prevent potential NULL pointer dereference. Reported-by: Vladimir Yerilov <openmindead@gmail.com> Fixes: ad74b864 ("usb: typec: ucsi: Preliminary support for alternate modes") Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment