diff options
author | Harsha Sharma <harshasharmaiitr@gmail.com> | 2017-09-08 23:21:25 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-18 12:11:44 +0200 |
commit | 4c87b3e58d0204d31eb00c76f323ecffd1960a91 (patch) | |
tree | 56a25e85d14500575d2ae3725dded932040e55b7 | |
parent | 76f0c53d08b933b4708be0d775ba57a0fb4d858a (diff) | |
download | linux-4c87b3e58d0204d31eb00c76f323ecffd1960a91.tar.bz2 |
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>
-rw-r--r-- | drivers/usb/typec/tcpm.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |