staging: greybus: add host device function pointer checks
authorJason Hrycay <jhrycay@gmail.com>
Tue, 20 Dec 2016 20:49:27 +0000 (14:49 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jan 2017 15:47:52 +0000 (16:47 +0100)
commitf05a88a39c5b5f226e08e626998bb920723b7d85
treeada0e0391345197bb73a5a6cf90f1506bf91f9d0
parenta072a72da96f8fedda3312686456c18c34ca179a
staging: greybus: add host device function pointer checks

Add sanity checks for cport_quiesce and cport_clear before invoking the
callbacks as these function pointers are not required during the host
device registration. This follows the logic implemented elsewhere for
various other function pointers.

Signed-off-by: Jason Hrycay <jhrycay@gmail.com>
Reviewed-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/connection.c