From: Gabriel Sanches <gabriel@gsr.dev>
To: linux-staging@lists.linux.dev, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
sakari.ailus@linux.intel.com, mchehab@kernel.org,
hansg@kernel.org, andy@kernel.org
Cc: ~lkcamp/patches@lists.sr.ht, koike@igalia.com,
Gabriel Sanches <gabriel@gsr.dev>
Subject: [PATCH] media: atomisp: Use negation to check for NULL
Date: Thu, 23 Apr 2026 15:14:36 -0300 [thread overview]
Message-ID: <20260423181443.46566-1-gabriel@gsr.dev> (raw)
Fix checkpath error 'CHECK: Comparison to NULL could be written
"!gmin_subdevs[i].subdev"' in atomisp_gmin_platform.c:650.
Signed-off-by: Gabriel Sanches <gabriel@gsr.dev>
---
Hey, this is my first patch ever. I would appreciate any
feedback. Thanks!
---
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
index 4026e98c5845..620924614ee3 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
@@ -647,7 +647,7 @@ static struct gmin_subdev *find_free_gmin_subdev_slot(void)
unsigned int i;
for (i = 0; i < MAX_SUBDEVS; i++)
- if (gmin_subdevs[i].subdev == NULL)
+ if (!gmin_subdevs[i].subdev)
return &gmin_subdevs[i];
return NULL;
}
--
2.52.0
next reply other threads:[~2026-04-23 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 18:14 Gabriel Sanches [this message]
2026-04-24 8:54 ` [PATCH] media: atomisp: Use negation to check for NULL Andy Shevchenko
2026-04-28 1:58 ` Helen Koike
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=20260423181443.46566-1-gabriel@gsr.dev \
--to=gabriel@gsr.dev \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=koike@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=~lkcamp/patches@lists.sr.ht \
/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