提交 3fe68cc1 编写于 作者: J Julia Lawall 提交者: James Bottomley

[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: NJulia Lawall <julia@diku.dk>
Acked-By: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 d4c9b736
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册