[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10409fa6738f3a9371985121b2838734249c1c3e.camel@fi.rohmeurope.com>
Date: Tue, 22 Jun 2021 15:30:52 +0000
From: "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
To: "lgirdwood@...il.com" <lgirdwood@...il.com>,
linux-power <linux-power@...rohmeurope.com>,
"broonie@...nel.org" <broonie@...nel.org>,
"colin.king@...onical.com" <colin.king@...onical.com>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] regulator: bd9576: Fix uninitializes variable
may_have_irqs
On Tue, 2021-06-22 at 15:47 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The boolean variable may_have_irqs is not ininitialized and is
> only being set to true in the case where chip is
> ROHM_CHIP_TYPE_BD9576.
> Fix this by ininitialized may_have_irqs to false.
>
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: e7bf1fa58c46 ("regulator: bd9576: Support error reporting")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/regulator/bd9576-regulator.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/bd9576-regulator.c
> b/drivers/regulator/bd9576-regulator.c
> index 8b54d88827be..e16c3727db7a 100644
> --- a/drivers/regulator/bd9576-regulator.c
> +++ b/drivers/regulator/bd9576-regulator.c
> @@ -897,7 +897,7 @@ static int bd957x_probe(struct platform_device
> *pdev)
> {
> int i;
> unsigned int num_reg_data;
> - bool vout_mode, ddr_sel, may_have_irqs;
> + bool vout_mode, ddr_sel, may_have_irqs = false;
> struct regmap *regmap;
> struct bd957x_data *ic_data;
> struct regulator_config config = { 0 };
Thanks a lot!
Acked-by: Matti Vaittinen <
matti.vaittinen@...rohmeurope.com>
Best Regards
Matti Vaittinen
Powered by blists - more mailing lists