diff options
author | Douglas Schilling Landgraf <dougsland@gmail.com> | 2008-01-27 12:29:51 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-02-18 09:14:59 -0500 |
commit | dd49f30ca032464839085ec3a54dd9917829c891 (patch) | |
tree | b2ea8b10b282f5579dcb3f29264cd7b5caba141c /drivers/media/radio | |
parent | 0e3301ec23000ffbbe28771eb79628856a9a2f84 (diff) |
V4L/DVB (7092): radio-sf16fmr2: fix request_region() validation [bugzilla 9699]
This patch changed the request_region() validation to avoid invalid return.
Thanks to Roland Kletzing <devzero@web.de> for bug report and data collection.
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r-- | drivers/media/radio/radio-sf16fmr2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index f7c8b000404f..ebc5fbbc38bb 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c | |||
@@ -470,9 +470,8 @@ static int __init fmr2_init(void) | |||
470 | 470 | ||
471 | mutex_init(&lock); | 471 | mutex_init(&lock); |
472 | 472 | ||
473 | if (request_region(io, 2, "sf16fmr2")) | 473 | if (!request_region(io, 2, "sf16fmr2")) { |
474 | { | 474 | printk(KERN_ERR "radio-sf16fmr2: request_region failed!\n"); |
475 | printk(KERN_ERR "fmr2: port 0x%x already in use\n", io); | ||
476 | return -EBUSY; | 475 | return -EBUSY; |
477 | } | 476 | } |
478 | 477 | ||