mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 05:45:13 +07:00
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: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
fffc151381
commit
9a586bd2bb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user