greybus: es2: fix arpc response-allocation error handling

The wrong pointer was checked for allocation failures when allocating
the ARPC response buffer, something which would lead to allocation
failures going undetected.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Johan Hovold 2016-07-27 16:37:20 +02:00 committed by Greg Kroah-Hartman
parent 23931ffb9a
commit fcba5d04c8
1 changed files with 1 additions and 1 deletions

View File

@ -1100,7 +1100,7 @@ static struct arpc *arpc_alloc(void *payload, u16 size, u8 type)
goto err_free_rpc; goto err_free_rpc;
rpc->resp = kzalloc(sizeof(*rpc->resp), GFP_KERNEL); rpc->resp = kzalloc(sizeof(*rpc->resp), GFP_KERNEL);
if (!rpc->req) if (!rpc->resp)
goto err_free_req; goto err_free_req;
rpc->req->type = type; rpc->req->type = type;