diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-09-16 19:34:24 +0530 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2015-10-16 10:46:07 +0530 |
commit | d311a28a5853857a73d54d15dc30797aa3b1802d (patch) | |
tree | 7ed80563fd1439490b1ad8138cdf28f113e3a5e8 /drivers/mailbox/pcc.c | |
parent | 049e6dde7e57f0054fdc49102e7ef4830c698b46 (diff) | |
download | linux-stable-d311a28a5853857a73d54d15dc30797aa3b1802d.tar.gz linux-stable-d311a28a5853857a73d54d15dc30797aa3b1802d.tar.bz2 linux-stable-d311a28a5853857a73d54d15dc30797aa3b1802d.zip |
PCC: fix dereference of ERR_PTR
get_pcc_channel() does not return NULL on error it returns the error code
in ERR_PTR, but we have been checking it for NULL.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Diffstat (limited to 'drivers/mailbox/pcc.c')
-rw-r--r-- | drivers/mailbox/pcc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 68885a82e704..45d85aea9955 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -122,7 +122,7 @@ struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl, */ chan = get_pcc_channel(subspace_id); - if (!chan || chan->cl) { + if (IS_ERR(chan) || chan->cl) { dev_err(dev, "Channel not found for idx: %d\n", subspace_id); return ERR_PTR(-EBUSY); } |