aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-trace.c
diff options
context:
space:
mode:
authorDmitry Rokosov <[email protected]>2022-05-24 18:14:39 +0000
committerJonathan Cameron <[email protected]>2022-06-19 17:22:48 +0100
commite5f3205b04d7f95a2ef43bce4b454a7f264d6923 (patch)
tree1c5b172fc0d4be5235ff646fa58368fbef66bcf3 /drivers/usb/cdns3/cdns3-trace.c
parent9decacd8b3a432316d61c4366f302e63384cb08d (diff)
iio:accel:bma180: rearrange iio trigger get and register
IIO trigger interface function iio_trigger_get() should be called after iio_trigger_register() (or its devm analogue) strictly, because of iio_trigger_get() acquires module refcnt based on the trigger->owner pointer, which is initialized inside iio_trigger_register() to THIS_MODULE. If this call order is wrong, the next iio_trigger_put() (from sysfs callback or "delete module" path) will dereference "default" module refcnt, which is incorrect behaviour. Fixes: 0668a4e4d297 ("iio: accel: bma180: Fix indio_dev->trig assignment") Signed-off-by: Dmitry Rokosov <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.c')
0 files changed, 0 insertions, 0 deletions