OSDN Git Service

staging: typec: tcpci: use IS_ERR() instead of PTR_ERR_OR_ZERO()
authorLi Jun <jun.li@nxp.com>
Tue, 26 Jun 2018 23:45:26 +0000 (07:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 10:49:48 +0000 (19:49 +0900)
commitd3a4c916a92f7e50acd58b54f300c4390c04639f
treeba418fff7f1b05844a76be2bfce8ae89463b7983
parentc2ee5e18652f7ed2bf6e0fbaa374f23cfd406e72
staging: typec: tcpci: use IS_ERR() instead of PTR_ERR_OR_ZERO()

As tcpm_register_port() and tcpci_register_port() never return
NULL and NULL is not a success in this case, use IS_ERR() to check
the return value of both.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/typec/tcpci.c