From: Johan Hovold Date: Mon, 7 Dec 2015 14:05:39 +0000 (+0100) Subject: greybus: interface: remove defensive WARN_ON X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1e6fb9a1451f01f8ea092e49f27338ef9d3c7811;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: interface: remove defensive WARN_ON 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 Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index e8eed858b545..27215cf30180 100644 --- a/drivers/staging/greybus/interface.c +++ b/drivers/staging/greybus/interface.c @@ -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);