staging: typec: tcpm: Rewrite comparison to NULL pointer

Make code more concise and readable

Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Harsha Sharma 2017-09-08 23:21:25 +05:30 committed by Greg Kroah-Hartman
parent 76f0c53d08
commit 4c87b3e58d

View File

@ -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);