mirror of https://gitee.com/openkylin/linux.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 <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
100e900008
commit
1e6fb9a145
|
@ -132,9 +132,6 @@ void gb_interface_remove(struct gb_interface *intf)
|
||||||
struct gb_bundle *bundle;
|
struct gb_bundle *bundle;
|
||||||
struct gb_bundle *next;
|
struct gb_bundle *next;
|
||||||
|
|
||||||
if (WARN_ON(!intf))
|
|
||||||
return;
|
|
||||||
|
|
||||||
spin_lock_irq(&gb_interfaces_lock);
|
spin_lock_irq(&gb_interfaces_lock);
|
||||||
list_del(&intf->links);
|
list_del(&intf->links);
|
||||||
spin_unlock_irq(&gb_interfaces_lock);
|
spin_unlock_irq(&gb_interfaces_lock);
|
||||||
|
|
Loading…
Reference in New Issue