usb: typec: hd3ss3220: hd3ss3220_probe() warn: passing zero to 'PTR_ERR'
authorBiju Das <biju.das@bp.renesas.com>
Mon, 7 Oct 2019 15:38:49 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2019 10:34:07 +0000 (12:34 +0200)
commit5a9a8a4c505851cfb1fe5772851fb528476575bb
treeec77cc82d54c4d028d657a1b5fa7fc6ac1909a6a
parenta4f55d8b8c146f9d99fe004bc9d1403d4c149ae3
usb: typec: hd3ss3220: hd3ss3220_probe() warn: passing zero to 'PTR_ERR'

This patch fixes the warning passing zero to 'PTR_ERR' by changing the
check from 'IS_ERR_OR_NULL' to 'IS_ERR'. Also improved the error handling
on probe function.

Fixes: 1c48c759ef4b ("usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller")
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/1570462729-25722-1-git-send-email-biju.das@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/hd3ss3220.c