diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-09-02 17:37:38 +0200 |
---|---|---|
committer | Johan Hovold <johan@hovoldconsulting.com> | 2015-09-03 09:43:46 +0200 |
commit | 1a58a3befaccdf84f5a31e3cecd26c8d57c10890 (patch) | |
tree | a45793f10832a2679ffb2a87e51e0b7863678c96 /drivers/staging/greybus/core.c | |
parent | f470ead894e3d33e70f62d43b8e255beb37f183b (diff) |
greybus: core: fix hd-creation error path
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>
Diffstat (limited to 'drivers/staging/greybus/core.c')
-rw-r--r-- | drivers/staging/greybus/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 3ba744b0e998..605a0887dc61 100644 --- 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) { |