usb: typec: tcpci_maxim: Fix uninitialized return variable
authorBadhri Jagan Sridharan <badhri@google.com>
Thu, 29 Oct 2020 06:31:38 +0000 (23:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 11:57:49 +0000 (12:57 +0100)
commit7695cae24b29edd2dbd3b3a77a7264cd6d9ca67a
treec6e315684c425f57f2c80fdc7c713e80231a893f
parentcccaee0e0aadb36edf38298d400ed76e3de21dd5
usb: typec: tcpci_maxim: Fix uninitialized return variable

New smatch warnings:
drivers/usb/typec/tcpm/tcpci_maxim.c:324 max_tcpci_irq() error: uninitialized symbol 'irq_return'.
drivers/usb/typec/tcpm/tcpci_maxim.c:407 max_tcpci_probe() warn: passing zero to 'PTR_ERR'

The change fixes the above warnings by initializing irq_return
and replacing IS_ERR_OR_NULL with IS_ERR.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20201029063138.1429760-11-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpci_maxim.c