From: Julia Lawall Date: Tue, 6 Jan 2009 22:42:25 +0000 (-0800) Subject: drivers/rtc: correct an error test X-Git-Tag: v2.6.29-rc1~277 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba6c4033b9db22cb54e7e03dae5b624b7b0ffaf9;p=pandora-kernel.git drivers/rtc: correct an error test rtc is clearly does not satisfy IS_ERR at the point where it is tested, so I have changed the test to consider the just initialized rtc->rtc_dev. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @match exists@ expression x, E; identifier fld; position p1,p2; @@ ( x = E; | x = E | x@p1->fld ... when != x = E IS_ERR(x@p2) ... when any ) @other_match exists@ expression match.x, E1, E2; position match.p1,match.p2; @@ x = E1 ... when != x = E2 when != x@p1 x@p2 @ script:python depends on !other_match@ p1 << match.p1; p2 << match.p2; @@ print "* file %s dereference %s test %s" % (p1[0].file,p1[0].line,p2[0].line) // Signed-off-by: Julia Lawall Acked-by: Alessandro Zummo Cc: David Brownell Cc: Bryan Wu Cc: Mike Frysinger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed