Skip to content

iio: frequency: adf4030: fix possible unitialized 'ret' #2766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions drivers/iio/frequency/adf4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@ static int adf4030_chan_dir_set(const struct adf4030_state *st,

/* EN_DRIVE */
if (chan->num > 7)
regmap_update_bits(st->regmap, ADF4030_REG(0x13),
BIT(chan->num - 8),
chan->channel_output_en ? BIT(chan->num - 8) : 0);
ret = regmap_update_bits(st->regmap, ADF4030_REG(0x13),
BIT(chan->num - 8),
chan->channel_output_en ? BIT(chan->num - 8) : 0);
else
regmap_update_bits(st->regmap, ADF4030_REG(0x12),
BIT(chan->num),
chan->channel_output_en ? BIT(chan->num) : 0);
ret = regmap_update_bits(st->regmap, ADF4030_REG(0x12),
BIT(chan->num),
chan->channel_output_en ? BIT(chan->num) : 0);
if (ret)
return ret;

Expand Down