[lvc-project] [PATCH] media: staging: atomisp: remove unnecessary NULL checks in sensor drivers

Andy Shevchenko andriy.shevchenko at intel.com
Sun Dec 28 22:52:33 MSK 2025


On Fri, Dec 12, 2025 at 03:38:14PM +0300, Mikhail Dmitrichenko wrote:
> There are unnecessary NULL checks for v4l2_subdev_format::format
> pointer in ov2722 and gc2235 sensor driver format operations.
> The fmt pointer is derived from &format->format where format
> is a pointer to an embedded struct v4l2_mbus_framefmt inside
> struct v4l2_subdev_format, therefore fmt cannot be NULL.
> 
> Remove unnecessary NULL checks for v4l2_subdev_format::format
> pointer to avoid unnecessary computations and make code
> clearer.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.

Reviewed-by: Andy Shevchenko <andriy.shevchenko at intel.com>
Sakari, can you pick this up?

> Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")

This is not needed. There is no bug to test non-NULL pointer.

> Signed-off-by: Mikhail Dmitrichenko <mdmitrichenko at astralinux.ru>

-- 
With Best Regards,
Andy Shevchenko





More information about the lvc-project mailing list