提交 4c87b3e5 编写于 作者: H Harsha Sharma 提交者: Greg Kroah-Hartman

staging: typec: tcpm: Rewrite comparison to NULL pointer

Make code more concise and readable
Signed-off-by: NHarsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 76f0c53d
...@@ -986,7 +986,7 @@ static void svdm_consume_modes(struct tcpm_port *port, const __le32 *payload, ...@@ -986,7 +986,7 @@ static void svdm_consume_modes(struct tcpm_port *port, const __le32 *payload,
} }
port->partner_altmode[pmdata->altmodes] = port->partner_altmode[pmdata->altmodes] =
typec_partner_register_altmode(port->partner, paltmode); typec_partner_register_altmode(port->partner, paltmode);
if (port->partner_altmode[pmdata->altmodes] == NULL) { if (!port->partner_altmode[pmdata->altmodes]) {
tcpm_log(port, tcpm_log(port,
"Failed to register alternate modes for SVID 0x%04x", "Failed to register alternate modes for SVID 0x%04x",
paltmode->svid); paltmode->svid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册