diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-07-27 16:37:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-07-28 10:04:06 -0700 |
commit | fcba5d04c87c5c0174f159d26b295a46bfb6da58 (patch) | |
tree | 316a92886c71e94f2a925d78f043a029435332af /drivers/staging/greybus/es2.c | |
parent | 23931ffb9ac892a51cdef4eefdfc255e3f810a8b (diff) |
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>
Diffstat (limited to 'drivers/staging/greybus/es2.c')
-rw-r--r-- | drivers/staging/greybus/es2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index afc2d6c8ec5c..130549f9d74d 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -1100,7 +1100,7 @@ static struct arpc *arpc_alloc(void *payload, u16 size, u8 type) goto err_free_rpc; rpc->resp = kzalloc(sizeof(*rpc->resp), GFP_KERNEL); - if (!rpc->req) + if (!rpc->resp) goto err_free_req; rpc->req->type = type; |