Message ID | Pine.LNX.4.64.0907271813120.2682@ask.diku.dk |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Julia Lawall <julia@diku.dk> Date: Mon, 27 Jul 2009 18:13:30 +0200 (CEST) > From: Julia Lawall <julia@diku.dk> > > res has already been tested. It seems that this test should be on the > recently returned value mmio. > > A simplified version of the semantic match that finds this problem is as > follows: (http://www.emn.fr/x-info/coccinelle/) ... > Signed-off-by: Julia Lawall <julia@diku.dk> Applied to net-next-2.6 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index ceb6a9c..4dbe5f1 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -894,7 +894,7 @@ static int ethoc_probe(struct platform_device *pdev) mmio = devm_request_mem_region(&pdev->dev, res->start, res->end - res->start + 1, res->name); - if (!res) { + if (!mmio) { dev_err(&pdev->dev, "cannot request I/O memory space\n"); ret = -ENXIO; goto free;