dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Andrew Morton 2008-01-07 05:24:51 -03:00 committed by Mauro Carvalho Chehab
parent 1434bc0cbb
commit 98512f7b36
1 changed files with 1 additions and 2 deletions

View File

@ -476,8 +476,7 @@ static int __init fmr2_init(void)
return -EBUSY;
}
if(video_register_device(&fmr2_radio, VFL_TYPE_RADIO, radio_nr)==-1)
{
if (video_register_device(&fmr2_radio, VFL_TYPE_RADIO, radio_nr) < 0) {
release_region(io, 2);
return -EINVAL;
}