The driver must make sure there is an actual connection
before checking details about the USB Power Delivery
contract. Those details are not valid unless there is a
connection.
This fixes NULL pointer dereference that is caused by an
attempt to register bogus partner alternate mode that the
firmware on some platform may report before the actual
connection.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215117
Fixes:
|
||
|---|---|---|
| .. | ||
| altmodes | ||
| mux | ||
| tcpm | ||
| tipd | ||
| ucsi | ||
| Kconfig | ||
| Makefile | ||
| bus.c | ||
| bus.h | ||
| class.c | ||
| class.h | ||
| hd3ss3220.c | ||
| mux.c | ||
| mux.h | ||
| port-mapper.c | ||
| qcom-pmic-typec.c | ||
| stusb160x.c | ||