From: Greg Kroah-Hartman Date: Tue, 26 May 2015 15:39:33 +0000 (-0700) Subject: greybus: Merge branch 'master' of github.com:gregkh/greybus X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d67a39ab38118b0d5ddfd45626d60088fa9a0021;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: Merge branch 'master' of github.com:gregkh/greybus --- d67a39ab38118b0d5ddfd45626d60088fa9a0021 diff --cc drivers/staging/greybus/core.c index 91dcc5bb158c,6106175b57c5..0a24822ac4ab --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@@ -185,14 -185,9 +185,14 @@@ struct greybus_host_device *greybus_cre if ((!driver->message_send) || (!driver->message_cancel) || (!driver->submit_svc)) { pr_err("Must implement all greybus_host_driver callbacks!\n"); - return NULL; + return ERR_PTR(-EINVAL); } + if (buffer_size_max < GB_OPERATION_MESSAGE_SIZE_MIN) { + dev_err(parent, "greybus host-device buffers too small\n"); + return NULL; + } + /* * Make sure to never allocate messages larger than what the Greybus * protocol supports.