usb: typec: Fix return type of tcpci_register_port() function
authorVipul Kumar <vipul_kumar@mentor.com>
Thu, 10 Jan 2019 07:16:50 +0000 (12:46 +0530)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit2f939a6d2f2e4d5b677e643e06a11b385c804c8a
tree3d874011d13c787aada64aed515602e1d4985d73
parent1ad464fe767895b44057ec05ecca6603c2a801f7
usb: typec: Fix return type of tcpci_register_port() function

This patch fix the return type of tcpci_register_port() to fix the
compilation warnings.

drivers/usb/typec/tcpci.c: In function ‘tcpci_register_port’:
drivers/usb/typec/tcpci.c:882:10: warning: returning ‘int’ from a function with return type ‘struct tcpci *’ makes pointer from integer without a cast [-Wint-conversion]
   return -ENOMEM;
          ^
drivers/usb/typec/tcpci.c:888:10: warning: returning ‘int’ from a function with return type ‘struct tcpci *’ makes pointer from integer without a cast [-Wint-conversion]
   return err;
          ^~~
drivers/usb/typec/tcpci.c: In function ‘tcpci_probe’:
drivers/usb/typec/tcpci.c:914:6: warning: unused variable ‘val’ [-Wunused-variable]
  u16 val = 0;
      ^~~
  AR      drivers/usb/typec/built-in.a

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
drivers/usb/typec/tcpci.c