Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d311a28a authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Jassi Brar
Browse files

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: default avatarSudip Mukherjee <sudip@vectorindia.org>
parent 049e6dde
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}