Skip to content

Commit

Permalink
regulator: bd9576: Fix uninitializes variable may_have_irqs
Browse files Browse the repository at this point in the history
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: e7bf1fa ("regulator: bd9576: Support error reporting")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/20210622144730.22821-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Colin Ian King authored and Mark Brown committed Jun 23, 2021
1 parent 1aeb1a7 commit ddf275b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/bd9576-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit ddf275b

Please sign in to comment.