aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-trace.c
diff options
context:
space:
mode:
authorDmitry Rokosov <[email protected]>2022-05-24 18:14:42 +0000
committerJonathan Cameron <[email protected]>2022-06-19 17:22:48 +0100
commited302925d708f2f97ae5e9fd6c56c16bb34f6629 (patch)
treee25996b35cfafa12c651645f956f1676f426b0f7 /drivers/usb/cdns3/cdns3-trace.c
parente5f3205b04d7f95a2ef43bce4b454a7f264d6923 (diff)
iio:accel:kxcjk-1013: 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: c1288b833881 ("iio: accel: kxcjk-1013: Increment ref counter for indio_dev->trig") 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