Commit 9a586bd2 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: operation: clean up create-incoming error path

Clean up gb_operation_create_incoming error path by returning
immediately on allocation failures.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent fffc1513
......@@ -511,10 +511,11 @@ gb_operation_create_incoming(struct gb_connection *connection, u16 id,
operation = gb_operation_create_common(connection, type,
request_size, 0, flags, GFP_ATOMIC);
if (operation) {
operation->id = id;
memcpy(operation->request->header, data, size);
}
if (!operation)
return NULL;
operation->id = id;
memcpy(operation->request->header, data, size);
return operation;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment