linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Mikhail Dmitrichenko <mdmitrichenko@astralinux.ru>
Cc: Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Andy Shevchenko <andy@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Thomas Andreatta <thomas.andreatta2000@gmail.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Ingo Molnar <mingo@kernel.org>, Alan Cox <alan@linux.intel.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev, lvc-project@linuxtesting.org
Subject: Re: [PATCH] media: staging: atomisp: remove unnecessary NULL checks in sensor drivers
Date: Sun, 28 Dec 2025 21:52:33 +0200	[thread overview]
Message-ID: <aVGKgdso3-cnEIsP@smile.fi.intel.com> (raw)
In-Reply-To: <20251212123814.78238-1-mdmitrichenko@astralinux.ru>

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@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@astralinux.ru>

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2025-12-28 19:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12 12:38 [PATCH] media: staging: atomisp: remove unnecessary NULL checks in sensor drivers Mikhail Dmitrichenko
2025-12-28 19:52 ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aVGKgdso3-cnEIsP@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=alan@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=lvc-project@linuxtesting.org \
    --cc=mchehab@kernel.org \
    --cc=mdmitrichenko@astralinux.ru \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=thomas.andreatta2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).