Commit 3fe68cc152fc7cc6a763c692544a0ab71926c800
Committed by
James Bottomley
1 parent
d4c9b73608
Exists in
master
and in
7 other branches
[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/) // <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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/scsi/sun3x_esp.c
... | ... | @@ -213,7 +213,7 @@ |
213 | 213 | esp->ops = &sun3x_esp_ops; |
214 | 214 | |
215 | 215 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
216 | - if (!res && !res->start) | |
216 | + if (!res || !res->start) | |
217 | 217 | goto fail_unlink; |
218 | 218 | |
219 | 219 | esp->regs = ioremap_nocache(res->start, 0x20); |
... | ... | @@ -221,7 +221,7 @@ |
221 | 221 | goto fail_unmap_regs; |
222 | 222 | |
223 | 223 | res = platform_get_resource(dev, IORESOURCE_MEM, 1); |
224 | - if (!res && !res->start) | |
224 | + if (!res || !res->start) | |
225 | 225 | goto fail_unmap_regs; |
226 | 226 | |
227 | 227 | esp->dma_regs = ioremap_nocache(res->start, 0x10); |