Skip to content

Commit 3fe68cc

Browse files
Julia LawallJames Bottomley
Julia Lawall
authored and
James Bottomley
committed
[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 <[email protected]> Acked-By: Thomas Bogendoerfer <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent d4c9b73 commit 3fe68cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/sun3x_esp.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ static int __devinit esp_sun3x_probe(struct platform_device *dev)
213213
esp->ops = &sun3x_esp_ops;
214214

215215
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
216-
if (!res && !res->start)
216+
if (!res || !res->start)
217217
goto fail_unlink;
218218

219219
esp->regs = ioremap_nocache(res->start, 0x20);
220220
if (!esp->regs)
221221
goto fail_unmap_regs;
222222

223223
res = platform_get_resource(dev, IORESOURCE_MEM, 1);
224-
if (!res && !res->start)
224+
if (!res || !res->start)
225225
goto fail_unmap_regs;
226226

227227
esp->dma_regs = ioremap_nocache(res->start, 0x10);

0 commit comments

Comments
 (0)