mirror of https://gitee.com/openkylin/linux.git
greybus: connection: remove WARN_ON from destroy
Remove WARN_ON from connection destroy testing for a NULL-connection when destroying a connection. This will allow for simpler driver code when releasing driver-managed connections. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
b807aa7aa5
commit
2edbf5ffbf
|
@ -507,7 +507,7 @@ void gb_connection_destroy(struct gb_connection *connection)
|
|||
{
|
||||
struct ida *id_map;
|
||||
|
||||
if (WARN_ON(!connection))
|
||||
if (!connection)
|
||||
return;
|
||||
|
||||
spin_lock_irq(&gb_connections_lock);
|
||||
|
|
Loading…
Reference in New Issue