Re: [bug report] media: rzg2l-cru: Retrieve virtual channel information

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

 



Hi Dan,

Thank you for the report.

On Wed, Oct 30, 2024 at 9:54 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> Hello Lad Prabhakar,
>
> Commit d7d72dae81d5 ("media: rzg2l-cru: Retrieve virtual channel
> information") from Oct 18, 2024 (linux-next), leads to the following
> Smatch static checker warning:
>
>         drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c:322 rzg2l_cru_get_virtual_channel()
>         error: 'remote_pad' dereferencing possible ERR_PTR()
>
This is a false positive.

> drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
>     315 static int rzg2l_cru_get_virtual_channel(struct rzg2l_cru_dev *cru)
>     316 {
>     317         struct v4l2_mbus_frame_desc fd = { };
>     318         struct media_pad *remote_pad;
>     319         int ret;
>     320
>     321         remote_pad = media_pad_remote_pad_unique(&cru->ip.pads[RZG2L_CRU_IP_SINK]);
>
> Does media_pad_remote_pad_unique() need error checking?
>
The code flow reaches `rzg2l_cru_get_virtual_channel()` only when the
media graph is connected, so in this case we are sure
`media_pad_remote_pad_unique()` will not return an error.

Cheers,
Prabhakar





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux