From: Julia Lawall Date: Wed, 16 Jul 2008 16:00:42 +0000 (+0200) Subject: drivers/usb/class/usblp.c: adjust error handling code X-Git-Tag: v2.6.28-rc1~254^2~88 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49b707b90c7f7260beb8691fc5d99d71a5549ec0;p=pandora-kernel.git drivers/usb/class/usblp.c: adjust error handling code In this code, it is possible to tell statically whether usblp will be NULL in the error handling code. Oliver Neukum suggested to make a goto to the final return rather than return directly. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ identifier f,err,l,l1; type T; expression x,E; statement S; @@ x = NULL ... when != goto l1; * x = f(...) ... when != x err = E; goto l; ... * if (x != NULL) S return err; // Signed-off-by: Julia Lawall Cc: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed