drivers/mmc: Move a dereference below a NULL test
authorJulia Lawall <julia@diku.dk>
Tue, 16 Dec 2008 15:13:09 +0000 (16:13 +0100)
committerPierre Ossman <drzeus@drzeus.cx>
Wed, 31 Dec 2008 17:18:14 +0000 (18:18 +0100)
In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>

No differences found