Commit 4c87b3e5 authored by Harsha Sharma's avatar Harsha Sharma Committed by Greg Kroah-Hartman

staging: typec: tcpm: Rewrite comparison to NULL pointer

Make code more concise and readable
Signed-off-by: default avatarHarsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 76f0c53d
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment