greybus: interface: remove defensive WARN_ON
authorJohan Hovold <johan@hovoldconsulting.com>
Mon, 7 Dec 2015 14:05:39 +0000 (15:05 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 8 Dec 2015 20:31:14 +0000 (15:31 -0500)
Remove defensive WARN_ON testing for a NULL-interface when removing an
interface.

Every call site has just dereferenced the interface.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/interface.c

index e8eed85..27215cf 100644 (file)
@@ -132,9 +132,6 @@ void gb_interface_remove(struct gb_interface *intf)
        struct gb_bundle *bundle;
        struct gb_bundle *next;
 
-       if (WARN_ON(!intf))
-               return;
-
        spin_lock_irq(&gb_interfaces_lock);
        list_del(&intf->links);
        spin_unlock_irq(&gb_interfaces_lock);