Commit 98512f7b authored by Andrew Morton's avatar Andrew Morton Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (6976): drivers/media/radio/radio-sf16fmr2.c: fix error handling

video_register_device() returns -EFOO on errr, not -1.


Reported-By: default avatar <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarMauro Carvalho Chehab <>
parent 1434bc0c
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment