]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: pcc: Avoid using the uninitialized variable 'dev'
authorSudeep Holla <sudeep.holla@arm.com>
Thu, 9 Dec 2021 08:21:43 +0000 (08:21 +0000)
committerJassi Brar <jaswinder.singh@linaro.org>
Wed, 12 Jan 2022 05:47:33 +0000 (23:47 -0600)
commit6877b5403eaf6021a00a2705dcc0b5bbe6633700
treedf5fb10bdfdbf0b01d5d969db8071278f6dfc8ce
parent08477b7cdeec38019c4b059d10beb2bf2400bf7f
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: a35c2b7c3023 ("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>
drivers/mailbox/pcc.c