From 4c87b3e58d0204d31eb00c76f323ecffd1960a91 Mon Sep 17 00:00:00 2001 From: Harsha Sharma Date: Fri, 8 Sep 2017 23:21:25 +0530 Subject: [PATCH] staging: typec: tcpm: Rewrite comparison to NULL pointer Make code more concise and readable Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index f557c479fdc2..8483d3e33853 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); -- GitLab