From 172c122df5186e7cbd413d61757ff90267331002 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 28 Apr 2008 16:50:03 -0700 Subject: scsi: fix integer as NULL pointer warnings drivers/scsi/aic7xxx/aic7770_osm.c:53:58: warning: Using plain integer as NULL pointer drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:355:47: warning: Using plain integer as NULL pointer drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:372:55: warning: Using plain integer as NULL pointer drivers/scsi/aha152x.c:997:28: warning: Using plain integer as NULL pointer drivers/scsi/aha152x.c:1003:28: warning: Using plain integer as NULL pointer drivers/scsi/aha152x.c:1165:46: warning: Using plain integer as NULL pointer drivers/scsi/fdomain.c:1446:40: warning: Using plain integer as NULL pointer drivers/scsi/sym53c8xx_2/sym_hipd.c:1650:51: warning: Using plain integer as NULL pointer drivers/scsi/sym53c8xx_2/sym_hipd.c:3171:42: warning: Using plain integer as NULL pointer drivers/scsi/sym53c8xx_2/sym_hipd.c:5732:52: warning: Using plain integer as NULL pointer drivers/scsi/ncr53c8xx.c:8189:31: warning: Using plain integer as NULL pointer drivers/scsi/ncr53c8xx.c:8225:34: warning: Using plain integer as NULL pointer drivers/scsi/dpt_i2o.c:156:32: warning: Using plain integer as NULL pointer drivers/scsi/ultrastor.c:954:42: warning: Using plain integer as NULL pointer drivers/scsi/ultrastor.c:1104:18: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison Signed-off-by: Linus Torvalds --- drivers/scsi/aic7xxx/aic7770_osm.c | 2 +- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/scsi/aic7xxx') diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c index 1ac119733bac..f220e5e436ab 100644 --- a/drivers/scsi/aic7xxx/aic7770_osm.c +++ b/drivers/scsi/aic7xxx/aic7770_osm.c @@ -50,7 +50,7 @@ aic7770_map_registers(struct ahc_softc *ahc, u_int port) /* * Lock out other contenders for our i/o space. */ - if (request_region(port, AHC_EISA_IOSIZE, "aic7xxx") == 0) + if (!request_region(port, AHC_EISA_IOSIZE, "aic7xxx")) return (ENOMEM); ahc->tag = BUS_SPACE_PIO; ahc->bsh.ioport = port; diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c index 0d7628f1f1ef..00f5b9868574 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c @@ -352,7 +352,7 @@ ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, resource_size_t *base) *base = pci_resource_start(ahc->dev_softc, 0); if (*base == 0) return (ENOMEM); - if (request_region(*base, 256, "aic7xxx") == 0) + if (!request_region(*base, 256, "aic7xxx")) return (ENOMEM); return (0); } @@ -369,7 +369,7 @@ ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc, start = pci_resource_start(ahc->dev_softc, 1); if (start != 0) { *bus_addr = start; - if (request_mem_region(start, 0x1000, "aic7xxx") == 0) + if (!request_mem_region(start, 0x1000, "aic7xxx")) error = ENOMEM; if (error == 0) { *maddr = ioremap_nocache(start, 256); -- cgit v1.2.3-59-g8ed1b