We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6613476 commit 95a0d59Copy full SHA for 95a0d59
drivers/iio/industrialio-core.c
@@ -1584,10 +1584,13 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev)
1584
ret = iio_device_register_sysfs_group(indio_dev,
1585
&iio_dev_opaque->chan_attr_group);
1586
if (ret)
1587
- goto error_clear_attrs;
+ goto error_free_chan_attrs;
1588
1589
return 0;
1590
1591
+error_free_chan_attrs:
1592
+ kfree(iio_dev_opaque->chan_attr_group.attrs);
1593
+ iio_dev_opaque->chan_attr_group.attrs = NULL;
1594
error_clear_attrs:
1595
iio_free_chan_devattr_list(&iio_dev_opaque->channel_attr_list);
1596
0 commit comments