]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
greybus: connection: remove WARN_ON from destroy
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 19 Jan 2016 11:51:22 +0000 (12:51 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 19 Jan 2016 20:17:13 +0000 (12:17 -0800)
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 <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c

index ebd038ea6e8a9692c0a934b687b91d55f11fb08e..d1508e21b37832a1995f9e6e367ae32d43d804fd 100644 (file)
@@ -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);