OSDN Git Service

greybus: Merge branch 'master' of github.com:gregkh/greybus
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 May 2015 15:39:33 +0000 (08:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 May 2015 15:39:33 +0000 (08:39 -0700)
1  2 
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.