diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-02-25 22:48:57 +0800 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-03-01 11:20:10 +0000 |
| commit | b403981da8a26f57f07859a9704392b1183e2a6e (patch) | |
| tree | 41ec425f92487fa66f51e14d7f57fc2bf7f6afef /drivers | |
| parent | 57b207e38d414a27fda9fff638a0d3e7ef16b917 (diff) | |
iio: dac: mcp47feb02: Fix mutex used before initialization
The mcp47feb02_parse_fw() function uses data->lock, but the mutex was
initialized after this function in probe path.
Since mcp47feb02_parse_fw() is only called from probe(), remove the lock.
Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/iio/dac/mcp47feb02.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/iio/dac/mcp47feb02.c b/drivers/iio/dac/mcp47feb02.c index b218f0c3a0bd..08fb85359697 100644 --- a/drivers/iio/dac/mcp47feb02.c +++ b/drivers/iio/dac/mcp47feb02.c @@ -955,8 +955,6 @@ static int mcp47feb02_parse_fw(struct iio_dev *indio_dev, u32 num_channels; u8 chan_idx = 0; - guard(mutex)(&data->lock); - num_channels = device_get_child_node_count(dev); if (num_channels > chip_features->phys_channels) return dev_err_probe(dev, -EINVAL, "More channels than the chip supports\n"); |
