Skip to content

Commit

Permalink
V4L/DVB (7092): radio-sf16fmr2: fix request_region() validation [bugz…
Browse files Browse the repository at this point in the history
…illa 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>
  • Loading branch information
Douglas Schilling Landgraf authored and Mauro Carvalho Chehab committed Feb 18, 2008
1 parent 0e3301e commit dd49f30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/media/radio/radio-sf16fmr2.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,8 @@ static int __init fmr2_init(void)

mutex_init(&lock);

if (request_region(io, 2, "sf16fmr2"))
{
printk(KERN_ERR "fmr2: port 0x%x already in use\n", io);
if (!request_region(io, 2, "sf16fmr2")) {
printk(KERN_ERR "radio-sf16fmr2: request_region failed!\n");
return -EBUSY;
}

Expand Down

0 comments on commit dd49f30

Please sign in to comment.