]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Fix null de-reference on error path
authorCristian Marussi <cristian.marussi@arm.com>
Fri, 12 Nov 2021 18:07:05 +0000 (18:07 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 15 Nov 2021 10:58:42 +0000 (10:58 +0000)
commite35397d31aa4376849b3ddc717ce68725aebe090
tree4c9186bdc91e659a4cd620966d65b3b1261820b9
parent40a9af63ae9ec42386d6c40b14f92fb56557c9a8
firmware: arm_scmi: Fix null de-reference on error path

During channel setup a failure in the call of scmi_vio_feed_vq_rx() leads
to an attempt to access a dev pointer by dereferencing vioch->cinfo at
a time when vioch->cinfo has still to be initialized.

Fix it by providing the device reference directly to scmi_vio_feed_vq_rx.

Link: https://lore.kernel.org/r/20211112180705.41601-1-cristian.marussi@arm.com
Fixes: 5c0279bd1b6b6 ("firmware: arm_scmi: Add virtio transport")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/virtio.c