From: Andrew Morton Date: Mon, 7 Jan 2008 08:24:51 +0000 (-0300) Subject: V4L/DVB (6976): drivers/media/radio/radio-sf16fmr2.c: fix error handling X-Git-Tag: v2.6.25-rc1~1235^2~75 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98512f7b36ec412ea0461e9aab8f16c882df055d;p=linux-2.6 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: Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index c432c44bd6..f7c8b00040 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) 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; }