From: Julia Lawall Date: Thu, 16 Aug 2012 21:46:57 +0000 (+0000) Subject: drivers/net/wan/dscc4.c: fix error return code X-Git-Tag: v3.6-rc3~10^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=623d896b361f404de5ed24e312a58646ee04207d;p=pandora-kernel.git drivers/net/wan/dscc4.c: fix error return code Move up the initialization of rc so that failure of pci_alloc_consistent returns -ENOMEM as well. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ if (ret < 0) { ... return ret; } ... when != ret = e1 when forall *if(...) { ... when != ret = e2 * return ret; } // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller --- Reading git-diff-tree failed