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 e8eed858b5458df81d898040b02e7b0a556cc38f..27215cf30180c3abea7107138c8b64c184aea33b 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);