From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Yizhuo <yzhai003@ucr.edu>
Cc: devel@driverdev.osuosl.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
linux-fbdev@vger.kernel.org,
Teddy Wang <teddy.wang@siliconmotion.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: sm750fb: Potential uninitialized field in "pll"
Date: Thu, 10 Oct 2019 09:04:06 +0000 [thread overview]
Message-ID: <20191010090406.GA466733@kroah.com> (raw)
In-Reply-To: <20191010043809.27594-1-yzhai003@ucr.edu>
On Wed, Oct 09, 2019 at 09:38:08PM -0700, Yizhuo wrote:
> Inside function set_chip_clock(), struct pll is supposed to be
> initialized in sm750_calc_pll_value(), if condition
> "diff < mini_diff" in sm750_calc_pll_value() cannot be fulfilled,
> then some field of pll will not be initialized but used in
> function sm750_format_pll_reg(), which is potentially unsafe.
>
> Signed-off-by: Yizhuo <yzhai003@ucr.edu>
> ---
> drivers/staging/sm750fb/ddk750_chip.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
> index 5a317cc98a4b..31b3cf9c2d8b 100644
> --- a/drivers/staging/sm750fb/ddk750_chip.c
> +++ b/drivers/staging/sm750fb/ddk750_chip.c
> @@ -55,7 +55,7 @@ static unsigned int get_mxclk_freq(void)
> */
> static void set_chip_clock(unsigned int frequency)
> {
> - struct pll_value pll;
> + struct pll_value pll = {};
> unsigned int actual_mx_clk;
>
> /* Cheok_0509: For SM750LE, the chip clock is fixed. Nothing to set. */
This doesn't apply to my tree at all. Please rebase it against the
staging-next branch of staging.git and resend.
thanks,
greg k-h
next prev parent reply other threads:[~2019-10-10 9:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 4:38 [PATCH] staging: sm750fb: Potential uninitialized field in "pll" Yizhuo
2019-10-10 9:04 ` Greg Kroah-Hartman [this message]
2019-10-10 9:53 ` Dan Carpenter
2019-10-11 0:37 ` Yizhuo Zhai
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=20191010090406.GA466733@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=teddy.wang@siliconmotion.com \
--cc=yzhai003@ucr.edu \
/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).