diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index f557c479fdc20c6116f14976a10c5488a42a0a6d..8483d3e3385376886a611f378438bc75166d7139 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -986,7 +986,7 @@ static void svdm_consume_modes(struct tcpm_port *port, const __le32 *payload, } port->partner_altmode[pmdata->altmodes] = typec_partner_register_altmode(port->partner, paltmode); - if (port->partner_altmode[pmdata->altmodes] == NULL) { + if (!port->partner_altmode[pmdata->altmodes]) { tcpm_log(port, "Failed to register alternate modes for SVID 0x%04x", paltmode->svid);