1 /// PTR_ERR should be applied before its argument is reassigned, typically
5 // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2.
6 // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
7 // URL: http://coccinelle.lip6.fr/
9 // Options: --no-includes --include-headers
24 when != true IS_ERR(e)
27 @script:python depends on org@
32 cocci.print_main("PTR_ERR",p2)
33 cocci.print_secs("assignment",p1)
35 @script:python depends on report@
40 msg = "ERROR: PTR_ERR applied after initialization to constant on line %s" % (p1[0].line)
41 coccilib.report.print_report(p2[0],msg)