From: Julien Brunel Date: Wed, 24 Sep 2008 21:22:22 +0000 (-0500) Subject: 9p: use an IS_ERR test rather than a NULL test X-Git-Tag: v2.6.27-rc8~25^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62aa528e0299ffef8e138d9d92d13e631d06c5ff;p=pandora-kernel.git 9p: use an IS_ERR test rather than a NULL test In case of error, the function p9_client_walk returns an ERR pointer, but never returns a NULL pointer. So a NULL test that comes after an IS_ERR test should be deleted. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @match_bad_null_test@ expression x, E; statement S1,S2; @@ x = p9_client_walk(...) ... when != x = E * if (x != NULL) S1 else S2 // Signed-off-by: Julien Brunel Signed-off-by: Julia Lawall Signed-off-by: Eric Van Hensbergen Signed-off-by: Andrew Morton --- Reading git-diff-tree failed