diff options
Diffstat (limited to 'drivers/uio/uio.c')
-rw-r--r-- | drivers/uio/uio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index f352731add64..03b66fb734a6 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -186,9 +186,9 @@ err: | |||
186 | for (mi--; mi>=0; mi--) { | 186 | for (mi--; mi>=0; mi--) { |
187 | mem = &idev->info->mem[mi]; | 187 | mem = &idev->info->mem[mi]; |
188 | map = mem->map; | 188 | map = mem->map; |
189 | kobject_unregister(&map->kobj); | 189 | kobject_put(&map->kobj); |
190 | } | 190 | } |
191 | kobject_unregister(idev->map_dir); | 191 | kobject_put(idev->map_dir); |
192 | sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); | 192 | sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); |
193 | err_group: | 193 | err_group: |
194 | dev_err(idev->dev, "error creating sysfs files (%d)\n", ret); | 194 | dev_err(idev->dev, "error creating sysfs files (%d)\n", ret); |
@@ -203,9 +203,9 @@ static void uio_dev_del_attributes(struct uio_device *idev) | |||
203 | mem = &idev->info->mem[mi]; | 203 | mem = &idev->info->mem[mi]; |
204 | if (mem->size == 0) | 204 | if (mem->size == 0) |
205 | break; | 205 | break; |
206 | kobject_unregister(&mem->map->kobj); | 206 | kobject_put(&mem->map->kobj); |
207 | } | 207 | } |
208 | kobject_unregister(idev->map_dir); | 208 | kobject_put(idev->map_dir); |
209 | sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); | 209 | sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); |
210 | } | 210 | } |
211 | 211 | ||