From: Julia Lawall Date: Wed, 2 Feb 2011 17:13:36 +0000 (+0100) Subject: mtd: ts5500_flash: avoid calling map_destroy on NULL X-Git-Tag: v2.6.39-rc1~40^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ee7451a023dd197fcfc1ba46dcce6d8ec5e1b78;p=pandora-kernel.git mtd: ts5500_flash: avoid calling map_destroy on NULL map_destroy dereferences its argument. The call is furthermore only reachable when this argument is NULL. Thus the call is dropped. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression *x; @@ *if (x == NULL) { ... * map_destroy(x); ... return ...; } // Signed-off-by: Julia Lawall Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed