From: Julia Lawall Date: Tue, 14 Oct 2008 16:00:19 +0000 (+0200) Subject: [SCSI] sun3x_esp: Convert && to || X-Git-Tag: v2.6.28-rc1~11^2~2 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3fe68cc152fc7cc6a763c692544a0ab71926c800;hp=d4c9b736080056ae3ba81dcf2ac418193c57dbb1;p=linux-2.6-omap-h63xx.git [SCSI] sun3x_esp: Convert && to || The pattern !E && !E->fld is nonsensical. The patch below updates this according to the assumption that && should be ||. But perhaps another solution was intended. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @disable and_comm@ expression E; identifier fld; @@ - !E && !E->fld + !E || !E->fld // Signed-off-by: Julia Lawall Acked-By: Thomas Bogendoerfer Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c index 7514b3a0390..34a99620e5b 100644 --- a/drivers/scsi/sun3x_esp.c +++ b/drivers/scsi/sun3x_esp.c @@ -213,7 +213,7 @@ static int __devinit esp_sun3x_probe(struct platform_device *dev) esp->ops = &sun3x_esp_ops; res = platform_get_resource(dev, IORESOURCE_MEM, 0); - if (!res && !res->start) + if (!res || !res->start) goto fail_unlink; esp->regs = ioremap_nocache(res->start, 0x20); @@ -221,7 +221,7 @@ static int __devinit esp_sun3x_probe(struct platform_device *dev) goto fail_unmap_regs; res = platform_get_resource(dev, IORESOURCE_MEM, 1); - if (!res && !res->start) + if (!res || !res->start) goto fail_unmap_regs; esp->dma_regs = ioremap_nocache(res->start, 0x10);