linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] drivers/pci/msi.c: fix a check after use
@ 2005-03-27 21:15 Adrian Bunk
  2005-03-28 23:21 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2005-03-27 21:15 UTC (permalink / raw)
  To: tom.l.nguyen; +Cc: gregkh, linux-kernel, linux-pci

This patch fixes a check after use found by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.12-rc1-mm1-full/drivers/pci/msi.c.old	2005-03-23 04:46:30.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/drivers/pci/msi.c	2005-03-23 04:47:03.000000000 +0100
@@ -703,12 +703,14 @@
  **/
 int pci_enable_msi(struct pci_dev* dev)
 {
-	int pos, temp = dev->irq, status = -EINVAL;
+	int pos, temp, status = -EINVAL;
 	u16 control;
 
 	if (!pci_msi_enable || !dev)
  		return status;
 
+	temp = dev->irq;
+
 	if ((status = msi_init()) < 0)
 		return status;
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [2.6 patch] drivers/pci/msi.c: fix a check after use
  2005-03-27 21:15 [2.6 patch] drivers/pci/msi.c: fix a check after use Adrian Bunk
@ 2005-03-28 23:21 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-03-28 23:21 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: tom.l.nguyen, gregkh, linux-kernel, linux-pci

On Sun, Mar 27, 2005 at 11:15:24PM +0200, Adrian Bunk wrote:
> This patch fixes a check after use found by the Coverity checker.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Applied, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-28 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-27 21:15 [2.6 patch] drivers/pci/msi.c: fix a check after use Adrian Bunk
2005-03-28 23:21 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).