From: Julien Brunel Date: Fri, 10 Oct 2008 19:00:19 +0000 (-0700) Subject: RDMA/ucma: Test ucma_alloc_multicast() return against NULL, not with IS_ERR() X-Git-Tag: v2.6.28-rc1~61^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aea938f54ca785ce3bea67a8948698225c6ca58;p=pandora-kernel.git RDMA/ucma: Test ucma_alloc_multicast() return against NULL, not with IS_ERR() In case of error, the function ucma_alloc_multicast() returns a NULL pointer, but never returns an ERR pointer. So after a call to this function, an IS_ERR test should be replaced by a NULL test. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @match bad_is_err_test@ expression x, E; @@ x = ucma_alloc_multicast(...) ... when != x = E IS_ERR(x) // Signed-off-by: Julien Brunel Signed-off-by: Julia Lawall Signed-off-by: Roland Dreier --- Reading git-diff-tree failed