kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] regulator: bd9576: Fix uninitializes variable may_have_irqs
@ 2021-06-22 14:47 Colin King
  2021-06-22 15:30 ` Vaittinen, Matti
  2021-06-23 16:08 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-06-22 14:47 UTC (permalink / raw)
  To: Matti Vaittinen, Liam Girdwood, Mark Brown, linux-power
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.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@canonical.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 };
-- 
2.31.1


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

* Re: [PATCH][next] regulator: bd9576: Fix uninitializes variable may_have_irqs
  2021-06-22 14:47 [PATCH][next] regulator: bd9576: Fix uninitializes variable may_have_irqs Colin King
@ 2021-06-22 15:30 ` Vaittinen, Matti
  2021-06-23 16:08 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Vaittinen, Matti @ 2021-06-22 15:30 UTC (permalink / raw)
  To: lgirdwood, linux-power, broonie, colin.king; +Cc: kernel-janitors, linux-kernel

On Tue, 2021-06-22 at 15:47 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.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@canonical.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@fi.rohmeurope.com>

Best Regards
	Matti Vaittinen

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

* Re: [PATCH][next] regulator: bd9576: Fix uninitializes variable may_have_irqs
  2021-06-22 14:47 [PATCH][next] regulator: bd9576: Fix uninitializes variable may_have_irqs Colin King
  2021-06-22 15:30 ` Vaittinen, Matti
@ 2021-06-23 16:08 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-06-23 16:08 UTC (permalink / raw)
  To: Liam Girdwood, Matti Vaittinen, linux-power, Colin King
  Cc: Mark Brown, linux-kernel, kernel-janitors

On Tue, 22 Jun 2021 15:47:30 +0100, Colin King wrote:
> 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.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: bd9576: Fix uninitializes variable may_have_irqs
      commit: ddf275b219ab22bc07c14ac88c290694089dced0

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2021-06-23 16:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 14:47 [PATCH][next] regulator: bd9576: Fix uninitializes variable may_have_irqs Colin King
2021-06-22 15:30 ` Vaittinen, Matti
2021-06-23 16:08 ` Mark Brown

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).