]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: typec: Start using ERR_PTR
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Fri, 2 Mar 2018 10:20:47 +0000 (11:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2018 17:46:18 +0000 (09:46 -0800)
commitcf6e06cddf29722a4e54b9d66df24c381b231600
tree527f052a6e57703685bb7d66d744c2704c56adc9
parentad70f937e9d0bdc580e390db3a047f9e58863b6e
usb: typec: Start using ERR_PTR

In order to allow the USB Type-C Class driver take care of
things like muxes and other possible dependencies for the
port drivers, returning ERR_PTR instead of NULL from the
registration functions in case of failure.

The reason for taking over control of the muxes for example
is because handling them in the port drivers would be just
boilerplate.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm.c
drivers/usb/typec/tps6598x.c
drivers/usb/typec/typec.c
drivers/usb/typec/ucsi/ucsi.c