summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-12-07 15:05:39 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-12-08 15:31:14 -0500
commit1e6fb9a1451f01f8ea092e49f27338ef9d3c7811 (patch)
tree8571f51565d113108ced7645b99847402425cdf2 /drivers/staging/greybus
parent100e90000840741b630d1a369119ccb57ea4e49c (diff)
downloadlinux-stable-1e6fb9a1451f01f8ea092e49f27338ef9d3c7811.tar.gz
linux-stable-1e6fb9a1451f01f8ea092e49f27338ef9d3c7811.tar.bz2
linux-stable-1e6fb9a1451f01f8ea092e49f27338ef9d3c7811.zip
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 <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r--drivers/staging/greybus/interface.c3
1 files changed, 0 insertions, 3 deletions
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);