summaryrefslogtreecommitdiffstats
path: root/drivers/iio/trigger/iio-trig-sysfs.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-10-24 12:52:50 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-11-23 20:44:03 +0100
commitf7626504432a6d30178bc6946d50a9d4a1bb4e31 (patch)
treec40d86188948031dc36f980b22ed9503851accf2 /drivers/iio/trigger/iio-trig-sysfs.c
parentiio: temperature: mlx90632 Style alignment for the driver (diff)
downloadlinux-f7626504432a6d30178bc6946d50a9d4a1bb4e31.tar.xz
linux-f7626504432a6d30178bc6946d50a9d4a1bb4e31.zip
iio: trigger: sysfs: rename error label in iio_sysfs_trigger_probe()
Rename error label in iio_sysfs_trigger_probe() to make more readable. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20221024105250.873394-1-yangyingliang@huawei.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/trigger/iio-trig-sysfs.c')
-rw-r--r--drivers/iio/trigger/iio-trig-sysfs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c
index d6c5e9644738..63ce01ac2036 100644
--- a/drivers/iio/trigger/iio-trig-sysfs.c
+++ b/drivers/iio/trigger/iio-trig-sysfs.c
@@ -138,18 +138,18 @@ static int iio_sysfs_trigger_probe(int id)
}
if (foundit) {
ret = -EINVAL;
- goto out1;
+ goto err_unlock;
}
t = kmalloc(sizeof(*t), GFP_KERNEL);
if (t == NULL) {
ret = -ENOMEM;
- goto out1;
+ goto err_unlock;
}
t->id = id;
t->trig = iio_trigger_alloc(&iio_sysfs_trig_dev, "sysfstrig%d", id);
if (!t->trig) {
ret = -ENOMEM;
- goto free_t;
+ goto err_free_sys_trig;
}
t->trig->dev.groups = iio_sysfs_trigger_attr_groups;
@@ -159,17 +159,17 @@ static int iio_sysfs_trigger_probe(int id)
ret = iio_trigger_register(t->trig);
if (ret)
- goto out2;
+ goto err_free_trig;
list_add(&t->l, &iio_sysfs_trig_list);
__module_get(THIS_MODULE);
mutex_unlock(&iio_sysfs_trig_list_mut);
return 0;
-out2:
+err_free_trig:
iio_trigger_free(t->trig);
-free_t:
+err_free_sys_trig:
kfree(t);
-out1:
+err_unlock:
mutex_unlock(&iio_sysfs_trig_list_mut);
return ret;
}