projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a13e2f
)
greybus: gb_hd_connection_find(): fix "not found" case
author
Marti Bolivar
<mbolivar@leaflabs.com>
Mon, 6 Oct 2014 17:26:02 +0000
(13:26 -0400)
committer
Greg Kroah-Hartman
<greg@kroah.com>
Mon, 6 Oct 2014 17:39:06 +0000
(10:39 -0700)
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>
drivers/staging/greybus/connection.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/greybus/connection.c
b/drivers/staging/greybus/connection.c
index 449ae34bf531d6b4829871dfdef1378a207cfcb8..07a593d2cbd146e69373517e3736fbc5bab0b487 100644
(file)
--- a/
drivers/staging/greybus/connection.c
+++ b/
drivers/staging/greybus/connection.c
@@
-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;