mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abdullah Mohammd Sifat <sifat.yt.2.0c@gmail.com>
To: hansg@kernel.org, mchehab@kernel.org, gregkh@linuxfoundation.org
Cc: linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Abdullah Mohammd Sifat <sifat.yt.2.0c@gmail.com>
Subject: [PATCH] drivers/staging/media/atomisp: Initialize curr_rules in atomisp_freq_scaling
Date: Mon, 26 Oct 2026 16:10:58 +0000	[thread overview]
Message-ID: <20261026161058.25031-1-sifat.yt.2.0c@gmail.com> (raw)

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


             reply	other threads:[~2026-10-26 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 16:10 Abdullah Mohammd Sifat [this message]
2026-10-26 16:33 ` Greg KH
2026-10-26 16:42 ` Dan Carpenter

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=20261026161058.25031-1-sifat.yt.2.0c@gmail.com \
    --to=sifat.yt.2.0c@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    /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

all inboxes | Powered by JetHome®