greybus: operation: drop redundant oom message
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 1 Jul 2015 10:37:29 +0000 (12:37 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 1 Jul 2015 23:54:44 +0000 (16:54 -0700)
Drop redundant OOM message, which would already have been logged by the
memory subsystem.

Also remove a FIXME about possibly sending a pre-allocated response,
which is neither possible or desirable. If we ever run out of memory we
have bigger problems then getting a response back to firmware.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/operation.c

index b32010b..d6e1db8 100644 (file)
@@ -673,12 +673,8 @@ static int gb_operation_response_send(struct gb_operation *operation,
                return 0;
 
        if (!operation->response) {
-               if (!gb_operation_response_alloc(operation, 0)) {
-                       dev_err(&connection->dev,
-                               "error allocating response\n");
-                       /* XXX Respond with pre-allocated -ENOMEM? */
+               if (!gb_operation_response_alloc(operation, 0))
                        return -ENOMEM;
-               }
        }
 
        /* Reference will be dropped when message has been sent. */