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

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>

authored by

Yang Yingliang and committed by
Jonathan Cameron
f7626504 a95ccebd

+7 -7
+7 -7
drivers/iio/trigger/iio-trig-sysfs.c
··· 138 138 } 139 139 if (foundit) { 140 140 ret = -EINVAL; 141 - goto out1; 141 + goto err_unlock; 142 142 } 143 143 t = kmalloc(sizeof(*t), GFP_KERNEL); 144 144 if (t == NULL) { 145 145 ret = -ENOMEM; 146 - goto out1; 146 + goto err_unlock; 147 147 } 148 148 t->id = id; 149 149 t->trig = iio_trigger_alloc(&iio_sysfs_trig_dev, "sysfstrig%d", id); 150 150 if (!t->trig) { 151 151 ret = -ENOMEM; 152 - goto free_t; 152 + goto err_free_sys_trig; 153 153 } 154 154 155 155 t->trig->dev.groups = iio_sysfs_trigger_attr_groups; ··· 159 159 160 160 ret = iio_trigger_register(t->trig); 161 161 if (ret) 162 - goto out2; 162 + goto err_free_trig; 163 163 list_add(&t->l, &iio_sysfs_trig_list); 164 164 __module_get(THIS_MODULE); 165 165 mutex_unlock(&iio_sysfs_trig_list_mut); 166 166 return 0; 167 167 168 - out2: 168 + err_free_trig: 169 169 iio_trigger_free(t->trig); 170 - free_t: 170 + err_free_sys_trig: 171 171 kfree(t); 172 - out1: 172 + err_unlock: 173 173 mutex_unlock(&iio_sysfs_trig_list_mut); 174 174 return ret; 175 175 }