Skip to contentSkip to conversation

media: venus: hfi,pm,firmware: Convert to block relative addressing

bug report Dan Carpenter 2 participants 2 messages Apr 9, 2021 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hello Bryan O'Donoghue,

This is a semi-automatic email about new static checker warnings.

The patch ff2a7013b3e6: "media: venus: hfi,pm,firmware: Convert to block relative addressing" from Apr 2, 2021, leads to the following Smatch complaint:

drivers/media/platform/qcom/venus/hfi_venus.c:1100 venus_isr()
warn: variable dereferenced before check 'hdev' (see line 1097)

drivers/media/platform/qcom/venus/hfi_venus.c
1096 u32 status;

  1097		void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
                                            ^^^^^^^^^^
  1098		void __iomem *wrapper_base = hdev->core->wrapper_base;
                                             ^^^^^^^^^^

The patch adds new unchecked dereferences before ...

1099
1100 if (!hdev)

                    ^^^^^

... this check.

1101 return IRQ_NONE;
1102

regards,
dan carpenter

#1 lore raw
Quoted 22 lines · Dan Carpenter

Hello Bryan O'Donoghue,

This is a semi-automatic email about new static checker warnings.

The patch ff2a7013b3e6: "media: venus: hfi,pm,firmware: Convert to block relative addressing" from Apr 2, 2021, leads to the following Smatch complaint:

drivers/media/platform/qcom/venus/hfi_venus.c:1100 venus_isr()
warn: variable dereferenced before check 'hdev' (see line 1097)

drivers/media/platform/qcom/venus/hfi_venus.c

   1096		u32 status;
   1097		void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
                                             ^^^^^^^^^^
   1098		void __iomem *wrapper_base = hdev->core->wrapper_base;
                                              ^^^^^^^^^^

The patch adds new unchecked dereferences before ...

   1099	
   1100		if (!hdev)
                     ^^^^^
Quoted 8 lines

... this check.

   1101			return IRQ_NONE;
   1102	

regards,
dan carpenter

https://www.mail-archive.com/[email protected]/msg2540720.html