From: Johan Hovold Date: Mon, 7 Dec 2015 14:05:39 +0000 (+0100) Subject: greybus: interface: remove defensive WARN_ON X-Git-Tag: v4.9.8~1233^2~378^2~21^2~943 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e6fb9a1451f01f8ea092e49f27338ef9d3c7811;p=platform%2Fkernel%2Flinux-rpi3.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 e8eed85..27215cf 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);