Skip to content

Commit

Permalink
PCC: fix dereference of ERR_PTR
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sudipm-mukherjee authored and JassiBrar committed Oct 16, 2015
1 parent 049e6dd commit d311a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mailbox/pcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d311a28

Please sign in to comment.