public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] media: atomisp: Use negation to check for NULL
@ 2026-04-23 18:14 Gabriel Sanches
  2026-04-24  8:54 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Sanches @ 2026-04-23 18:14 UTC (permalink / raw)
  To: linux-staging, linux-media, linux-kernel, gregkh, sakari.ailus,
	mchehab, hansg, andy
  Cc: ~lkcamp/patches, koike, Gabriel Sanches

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-28  1:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 18:14 [PATCH] media: atomisp: Use negation to check for NULL Gabriel Sanches
2026-04-24  8:54 ` Andy Shevchenko
2026-04-28  1:58   ` Helen Koike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox