mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 5 of 5 ] /drivers/char/watchdog ioremap balancing/ returncode check
@ 2007-08-13  4:06 Scott Thompson
  0 siblings, 0 replies; only message in thread
From: Scott Thompson @ 2007-08-13  4:06 UTC (permalink / raw)
  To: linux-kernel, kernel-janitors, dri-devel

patchset against 2.6.23-rc2 and this set is an audit of 
/drivers/char/a* 
through drivers/char .   

this corrects missing ioremap return checks and balancing on 
iounmap calls..

Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
----------------------------------------------------------
diff --git a/drivers/char/watchdog/iTCO_wdt.c 
b/drivers/char/watchdog/iTCO_wdt.c
index cd5a565..81c5901 100644
--- a/drivers/char/watchdog/iTCO_wdt.c
+++ b/drivers/char/watchdog/iTCO_wdt.c
@@ -621,6 +621,12 @@ static int iTCO_wdt_init(struct pci_dev *pdev, 
const struct pci_device_id *ent,
 		pci_read_config_dword(pdev, 0xf0, &base_address);
 		RCBA = base_address & 0xffffc000;
 		iTCO_wdt_private.gcs = ioremap((RCBA + 0x3410),4);
+		if (!iTCO_wdt_private.gcs) {
+			printk(KERN_ERR PFX "failed to ioremap\n");
+			ret = -ENOMEM;
+			goto out;
+		}
+
 	}
 
 	/* Check chipset's NO_REBOOT bit */



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-13  4:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-13  4:06 [PATCH 5 of 5 ] /drivers/char/watchdog ioremap balancing/ returncode check Scott Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®