diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2021-12-09 08:21:43 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 12:02:11 +0100 |
commit | b986b4ef835f6ef870ac152fb1ac9866330f94e4 (patch) | |
tree | 131e152f01e6f458ca4a9e9b7fc29976924eba5d /drivers/mailbox | |
parent | 3309cb57ae7110ee2bd04642ce3c08b3eb035817 (diff) |
mailbox: pcc: Avoid using the uninitialized variable 'dev'
[ Upstream commit 960c4056aadcf61983f8eaac159927a052f8cf01 ]
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: ce028702ddbc ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe")
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mailbox')
-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 887a3704c12e..e0a1ab3861f0 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -289,7 +289,7 @@ pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) pchan = chan_info + subspace_id; chan = pchan->chan.mchan; if (IS_ERR(chan) || chan->cl) { - dev_err(dev, "Channel not found for idx: %d\n", subspace_id); + pr_err("Channel not found for idx: %d\n", subspace_id); return ERR_PTR(-EBUSY); } dev = chan->mbox->dev; |