aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-01-07 03:24:51 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:04:41 -0500
commit98512f7b36ec412ea0461e9aab8f16c882df055d (patch)
treea4b734f0ff9e5a8e28e222b333ccca79f7518454 /drivers/media/radio
parent1434bc0cbb842ed71eada244ac46185e3b17e4e2 (diff)
V4L/DVB (6976): drivers/media/radio/radio-sf16fmr2.c: fix error handling
video_register_device() returns -EFOO on errr, not -1. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9699 Reported-By: <devzero@web.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r--drivers/media/radio/radio-sf16fmr2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index c432c44bd634..f7c8b000404f 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -476,8 +476,7 @@ static int __init fmr2_init(void)
476 return -EBUSY; 476 return -EBUSY;
477 } 477 }
478 478
479 if(video_register_device(&fmr2_radio, VFL_TYPE_RADIO, radio_nr)==-1) 479 if (video_register_device(&fmr2_radio, VFL_TYPE_RADIO, radio_nr) < 0) {
480 {
481 release_region(io, 2); 480 release_region(io, 2);
482 return -EINVAL; 481 return -EINVAL;
483 } 482 }