From df0b4ca7281eb52502a930f064748b7668875d64 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 7 Jan 2008 06:24:51 -0200 Subject: drivers/media/radio/radio-sf16fmr2.c: fix error handling From: Andrew Morton 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 --- linux/drivers/media/radio/radio-sf16fmr2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'linux/drivers/media/radio') diff --git a/linux/drivers/media/radio/radio-sf16fmr2.c b/linux/drivers/media/radio/radio-sf16fmr2.c index 06e61146a..a61076fb2 100644 --- a/linux/drivers/media/radio/radio-sf16fmr2.c +++ b/linux/drivers/media/radio/radio-sf16fmr2.c @@ -481,8 +481,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; } -- cgit v1.2.3