Skip to content

Commit

Permalink
[SCSI] sun3x_esp: Convert && to ||
Browse files Browse the repository at this point in the history
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/)

// <smpl>
@disable and_comm@
expression E;
identifier fld;
@@

- !E && !E->fld
+ !E || !E->fld
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-By: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Julia Lawall authored and James Bottomley committed Oct 23, 2008
1 parent d4c9b73 commit 3fe68cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/sun3x_esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ 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);
if (!esp->regs)
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);
Expand Down

0 comments on commit 3fe68cc

Please sign in to comment.