mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/staging/media/atomisp: Initialize curr_rules in atomisp_freq_scaling
@ 2026-10-26 16:10 Abdullah Mohammd Sifat
  2026-10-26 16:33 ` Greg KH
  2026-10-26 16:42 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Abdullah Mohammd Sifat @ 2026-10-26 16:10 UTC (permalink / raw)
  To: hansg, mchehab, gregkh
  Cc: linux-media, linux-staging, linux-kernel, Abdullah Mohammd Sifat

The local structure 'curr_rules' is declared on the stack but is
not initialized. Initialize it to zero using empty brackets '{}'
to prevent potential information leakage of stack garbage values.

Signed-off-by: Abdullah Mohammd Sifat <sifat.yt.2.0c@gmail.com>
---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index e66a7d1c7a0e..d4de2bd9a0a5 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -170,7 +170,6 @@ static int write_target_freq_to_hw(struct atomisp_device *isp,
 		dev_err(isp->dev, "DFS target freq is rejected by HW.\n");
 		return -EINVAL;
 	}
-
 	return 0;
 }
 
@@ -180,7 +179,8 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
 {
 	const struct atomisp_dfs_config *dfs;
 	unsigned int new_freq;
-	struct atomisp_freq_scaling_rule curr_rules;
+	struct atomisp_freq_scaling_rule curr_rules = {};
+
 	int i, ret;
 	unsigned short fps = 0;
 
-- 
2.53.0


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

end of thread, other threads:[~2026-10-26 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 16:10 [PATCH] drivers/staging/media/atomisp: Initialize curr_rules in atomisp_freq_scaling Abdullah Mohammd Sifat
2026-10-26 16:33 ` Greg KH
2026-10-26 16:42 ` Dan Carpenter

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

all inboxes | Powered by JetHome®