summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2006-07-25 16:37:03 -0700
committerTrent Piepho <xyzzy@speakeasy.org>2006-07-25 16:37:03 -0700
commita7a6f49f65d604c495620f2318f7a28e3164ed2f (patch)
tree3f49ad2e73723c53649c1685de97f4ec1509db43 /linux
parentd2b50f08a0b4258a332fac30883882f8606704bf (diff)
downloadmediapointer-dvb-s2-a7a6f49f65d604c495620f2318f7a28e3164ed2f.tar.gz
mediapointer-dvb-s2-a7a6f49f65d604c495620f2318f7a28e3164ed2f.tar.bz2
videodev: Check return value of class_device_register() correctly
From: Trent Piepho <xyzzy@speakeasy.org> Errors are return values < 0, not != 0. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/videodev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index d01b2a740..4ac9eb21a 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -1596,7 +1596,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
#endif
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;