Skip to content

Commit

Permalink
V4L/DVB (4379): Videodev: Check return value of class_device_register…
Browse files Browse the repository at this point in the history
…() correctly

Errors are return values < 0, not != 0.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Jul 29, 2006
1 parent 08d4180 commit 8c31311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/videodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base);
ret = class_device_register(&vfd->class_dev);
if (ret) {
if (ret < 0) {
printk(KERN_ERR "%s: class_device_register failed\n",
__FUNCTION__);
goto fail_minor;
Expand Down

0 comments on commit 8c31311

Please sign in to comment.