Skip to content

Commit 960c405

Browse files
sudeep-hollaJassiBrar
authored andcommitted
mailbox: pcc: Avoid using the uninitialized variable 'dev'
Smatch static checker warns: | drivers/mailbox/pcc.c:292 pcc_mbox_request_channel() | error: uninitialized symbol 'dev'. Fix the same by using pr_err instead of dev_err as the variable 'dev' is uninitialized at that stage. Fixes: ce02870 ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe") Cc: Jassi Brar <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent af8d0f6 commit 960c405

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mailbox/pcc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id)
289289
pchan = chan_info + subspace_id;
290290
chan = pchan->chan.mchan;
291291
if (IS_ERR(chan) || chan->cl) {
292-
dev_err(dev, "Channel not found for idx: %d\n", subspace_id);
292+
pr_err("Channel not found for idx: %d\n", subspace_id);
293293
return ERR_PTR(-EBUSY);
294294
}
295295
dev = chan->mbox->dev;

0 commit comments

Comments
 (0)