OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f470ead
)
greybus: core: fix hd-creation error path
author
Johan Hovold
<johan@hovoldconsulting.com>
Wed, 2 Sep 2015 15:37:38 +0000
(17:37 +0200)
committer
Johan Hovold
<johan@hovoldconsulting.com>
Thu, 3 Sep 2015 07:43:46 +0000
(09:43 +0200)
Make sure to return an errno when a host-device buffer-size check fails.
Fixes:
1f92f6404614
("core: return error code when creating host device")
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/staging/greybus/core.c
patch
|
blob
|
history
diff --git
a/drivers/staging/greybus/core.c
b/drivers/staging/greybus/core.c
index
3ba744b
..
605a088
100644
(file)
--- a/
drivers/staging/greybus/core.c
+++ b/
drivers/staging/greybus/core.c
@@
-184,7
+184,7
@@
struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *driver
if (buffer_size_max < GB_OPERATION_MESSAGE_SIZE_MIN) {
dev_err(parent, "greybus host-device buffers too small\n");
- return
NULL
;
+ return
ERR_PTR(-EINVAL)
;
}
if (num_cports == 0 || num_cports > CPORT_ID_MAX) {