From: Johan Hovold Date: Tue, 19 Jan 2016 11:51:22 +0000 (+0100) Subject: greybus: connection: remove WARN_ON from destroy X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~790 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2edbf5ffbf5ef8b92518e57687e96a7d34ddd3c4;p=karo-tx-linux.git greybus: connection: remove WARN_ON from destroy Remove WARN_ON from connection destroy testing for a NULL-connection when destroying a connection. This will allow for simpler driver code when releasing driver-managed connections. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index ebd038ea6e8a..d1508e21b378 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -507,7 +507,7 @@ void gb_connection_destroy(struct gb_connection *connection) { struct ida *id_map; - if (WARN_ON(!connection)) + if (!connection) return; spin_lock_irq(&gb_connections_lock);