1
0
Fork 0

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>
hifive-unleashed-5.1
Sudip Mukherjee 2015-09-16 19:34:24 +05:30 committed by Jassi Brar
parent 049e6dde7e
commit d311a28a58
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}