Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ade9000: move mutex init before IRQ registration

Move devm_mutex_init() before ade9000_request_irq() calls so that
st->lock is initialized before any handler that depends on it can run.

Fixes: 81de7b4619fc ("iio: adc: add ade9000 support")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
0206dd36 c53bca09

+4 -4
+4 -4
drivers/iio/adc/ade9000.c
··· 1706 1706 1707 1707 init_completion(&st->reset_completion); 1708 1708 1709 + ret = devm_mutex_init(dev, &st->lock); 1710 + if (ret) 1711 + return ret; 1712 + 1709 1713 ret = ade9000_request_irq(dev, "irq0", ade9000_irq0_thread, indio_dev); 1710 1714 if (ret) 1711 1715 return ret; ··· 1719 1715 return ret; 1720 1716 1721 1717 ret = ade9000_request_irq(dev, "dready", ade9000_dready_thread, indio_dev); 1722 - if (ret) 1723 - return ret; 1724 - 1725 - ret = devm_mutex_init(dev, &st->lock); 1726 1718 if (ret) 1727 1719 return ret; 1728 1720