summaryrefslogtreecommitdiffstats
path: root/drivers/iio/trigger
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:43:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:43:32 +0000
commitf530fbb7a18f2794e4178dfb7cd07719b9586147 (patch)
tree3f704b17427743e26452771cf7da2ed110346ddd /drivers/iio/trigger
parentAdding debian version 4.19.260-1. (diff)
downloadlinux-f530fbb7a18f2794e4178dfb7cd07719b9586147.tar.xz
linux-f530fbb7a18f2794e4178dfb7cd07719b9586147.zip
Merging upstream version 4.19.269.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/iio/trigger')
-rw-r--r--drivers/iio/trigger/iio-trig-sysfs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c
index cccc07e63..9daba4b16 100644
--- a/drivers/iio/trigger/iio-trig-sysfs.c
+++ b/drivers/iio/trigger/iio-trig-sysfs.c
@@ -211,9 +211,13 @@ static int iio_sysfs_trigger_remove(int id)
static int __init iio_sysfs_trig_init(void)
{
+ int ret;
device_initialize(&iio_sysfs_trig_dev);
dev_set_name(&iio_sysfs_trig_dev, "iio_sysfs_trigger");
- return device_add(&iio_sysfs_trig_dev);
+ ret = device_add(&iio_sysfs_trig_dev);
+ if (ret)
+ put_device(&iio_sysfs_trig_dev);
+ return ret;
}
module_init(iio_sysfs_trig_init);