Skip to content

Commit

Permalink
V4L/DVB (6976): drivers/media/radio/radio-sf16fmr2.c: fix error handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 1434bc0 commit 98512f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/radio/radio-sf16fmr2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 98512f7

Please sign in to comment.