Patch "mailbox: pcc: Avoid using the uninitialized variable 'dev'" has been added to the 5.16-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mailbox: pcc: Avoid using the uninitialized variable 'dev'

to the 5.16-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mailbox-pcc-avoid-using-the-uninitialized-variable-d.patch
and it can be found in the queue-5.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 26a708abb531dc744636450afec5508debec1d37
Author: Sudeep Holla <sudeep.holla@xxxxxxx>
Date:   Thu Dec 9 08:21:43 2021 +0000

    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@xxxxxxxxx>
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx>
    Signed-off-by: Jassi Brar <jaswinder.singh@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 887a3704c12ec..e0a1ab3861f0d 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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux