All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ][Patch] check return value of request_region in
Date: Fri, 03 Mar 2006 06:31:58 +0000	[thread overview]
Message-ID: <4407E2DE.5010809@vc.cvut.cz> (raw)
In-Reply-To: <1141029654.7765.6.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]

Darren Jenkins\ wrote:
> G'day list,
> 
> matroxfb_base.c calles 'request_region' @ 1737 without checking the
> return value.
> 
> The patch below adds a check for this and plugs into the existing error
> path.

Won't this conflict with reserving same I/O ports?  Only primary card 
succeeds with reservation, so if you really want to fix this "bug", then 
remove this I/O reservation from matroxfb completely, matroxfb never 
touches this I/O region, it just reserves it to make sure that you won't 
load vesafb and matroxfb for same head.  Your fix makes use of matroxfb 
with two Matrox cards in the box impossible, as on second card 0x3C0 
reservation must fail as first head made reservation already.
								Petr

> Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
> 
> --- linux-2.6.16-rc4/drivers/video/matrox/matroxfb_base.c.orig	2006-02-24 23:44:10.000000000 +1100
> +++ linux-2.6.16-rc4/drivers/video/matrox/matroxfb_base.c	2006-02-27 19:26:26.000000000 +1100
> @@ -1734,7 +1734,11 @@ static int initMatrox2(WPMINFO struct bo
>  #endif	/* CONFIG_MTRR */
>  
>  	if (!ACCESS_FBINFO(devflags.novga))
> -		request_region(0x3C0, 32, "matrox");
> +		if (!request_region(0x3C0, 32, "matrox")) {
> +			printk(KERN_ERR "matroxfb: failed to request_region");
> +			err = -EBUSY;
> +			goto failVideoIO;
> +		}
>  	matroxfb_g450_connect(PMINFO2);
>  	ACCESS_FBINFO(hw_switch->reset(PMINFO2));
>  
> 
> 
> 



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2006-03-03  6:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27  8:40 [KJ][Patch] check return value of request_region in matroxfb_base.c Darren Jenkins\
2006-03-01  7:12 ` [KJ][Patch] check return value of request region in ali5455.c Darren Jenkins\
2006-03-03  6:31 ` Petr Vandrovec [this message]
2006-03-11 13:48 ` [KJ][Patch] check return value of request_irq in amiserial.c Darren Jenkins\
2006-03-13  4:37 ` [KJ][Patch] check return value of request_irq in pcnet_cs.c Darren Jenkins\
2006-03-13  5:00 ` Randy.Dunlap
2006-03-13  5:16 ` Darren Jenkins\
2006-03-13  5:27 ` Randy.Dunlap
2006-03-13  6:16 ` Darren Jenkins\
2006-03-13 11:56 ` [KJ][Patch] check return value of request_irq in i82365.c Darren Jenkins\
2006-03-13 12:29 ` Tobias Klauser
2006-03-14  8:44 ` Darren Jenkins\
2006-03-14 16:26 ` Randy.Dunlap
2006-03-15  7:02 ` Darren Jenkins\
2006-03-15  7:32 ` Nishanth Aravamudan
2006-03-15 12:46 ` [KJ][Patch] check return value of request_region and request_irq Darren Jenkins\
2006-03-15 12:57 ` Tobias Klauser
2006-03-16 10:45 ` [KJ][Patch] check return value of request_region and Darren Jenkins\

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4407E2DE.5010809@vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.