Skip to content

Commit

Permalink
iio: adc: ad9361: fix possible '-Wuninitialized'
Browse files Browse the repository at this point in the history
'val' could be used uninitialized in case the 'default' branch is taken.
It's not a real issue since 'ret < 0 ? ret : ...' would still make it
right but let's make the compiler happy by initializing the variable.

Signed-off-by: Nuno Sa <[email protected]>
  • Loading branch information
nunojsa committed Nov 14, 2023
1 parent 4c5f27d commit b6c5cb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/ad9361.c
Original file line number Diff line number Diff line change
Expand Up @@ -7811,7 +7811,7 @@ static ssize_t ad9361_phy_tx_read(struct iio_dev *indio_dev,
{
struct ad9361_rf_phy *phy = iio_priv(indio_dev);
u8 reg_val_buf[3];
u32 val;
u32 val = 0;
int ret;

mutex_lock(&phy->lock);
Expand Down

0 comments on commit b6c5cb4

Please sign in to comment.