]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: dac: mcp47feb02: Fix mutex used before initialization
authorFelix Gu <ustc.gu@gmail.com>
Wed, 25 Feb 2026 14:48:57 +0000 (22:48 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 1 Mar 2026 11:20:10 +0000 (11:20 +0000)
commitb403981da8a26f57f07859a9704392b1183e2a6e
tree41ec425f92487fa66f51e14d7f57fc2bf7f6afef
parent57b207e38d414a27fda9fff638a0d3e7ef16b917
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>
drivers/iio/dac/mcp47feb02.c