mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
greybus: gb_hd_connection_find(): fix "not found" case
Without this, null-testing the return value of this function is broken. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
parent
7a13e2f688
commit
e86905b6cd
@ -56,8 +56,10 @@ struct gb_connection *gb_hd_connection_find(struct greybus_host_device *hd,
|
||||
else if (connection->hd_cport_id < cport_id)
|
||||
node = node->rb_right;
|
||||
else
|
||||
break;
|
||||
goto found;
|
||||
}
|
||||
connection = NULL;
|
||||
found:
|
||||
spin_unlock_irq(&gb_connections_lock);
|
||||
|
||||
return connection;
|
||||
|
Loading…
Reference in New Issue
Block a user