greybus: connection: protocol can be NULL in gb_connection_exit()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 31 Aug 2015 11:51:15 +0000 (17:21 +0530)
committerJohan Hovold <johan@hovoldconsulting.com>
Thu, 3 Sep 2015 13:41:33 +0000 (15:41 +0200)
commit6c0d57b4e612c00b14852c2f8b179d518462ea6c
treec97f9d82c632a35b2ebead7c24a2d710eb422c1d
parent50bb9ccaa0e12823e7f225ce1571d4ae3d1f83e0
greybus: connection: protocol can be NULL in gb_connection_exit()

gb_connection_exit() is getting called from gb_connection_destroy() now,
which will get called from failure path of gb_connection_create_range()
(in a later commit). And at that point connection->protocol will be
NULL.

Don't print an error message if this happens in gb_connection_exit().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
drivers/staging/greybus/connection.c