diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/videodev.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 5c5281981231..caa4f736468a 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -1538,6 +1538,8 @@ int video_register_device(struct video_device *vfd, int type, int nr) | |||
1538 | name_base = "radio"; | 1538 | name_base = "radio"; |
1539 | break; | 1539 | break; |
1540 | default: | 1540 | default: |
1541 | printk(KERN_ERR "%s called with unknown type: %d\n", | ||
1542 | __FUNCTION__, type); | ||
1541 | return -1; | 1543 | return -1; |
1542 | } | 1544 | } |
1543 | 1545 | ||
@@ -1592,6 +1594,15 @@ int video_register_device(struct video_device *vfd, int type, int nr) | |||
1592 | "http://lwn.net/Articles/36850/\n", vfd->name); | 1594 | "http://lwn.net/Articles/36850/\n", vfd->name); |
1593 | #endif | 1595 | #endif |
1594 | return 0; | 1596 | return 0; |
1597 | |||
1598 | fail_classdev: | ||
1599 | class_device_unregister(&vfd->class_dev); | ||
1600 | fail_minor: | ||
1601 | mutex_lock(&videodev_lock); | ||
1602 | video_device[vfd->minor] = NULL; | ||
1603 | vfd->minor = -1; | ||
1604 | mutex_unlock(&videodev_lock); | ||
1605 | return ret; | ||
1595 | } | 1606 | } |
1596 | 1607 | ||
1597 | /** | 1608 | /** |