From: Julia Lawall <julia@diku.dk>

[ FIXME Use path instead in message? Confirm the NULL test still makes sense.]

If pgpath->pg->ps.type is NULL, it is not possible to access its name
field.  So I have simply modified the error message to drop the printing of
the name field.


This problem was found using the following semantic match
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

* if (E == NULL)
{
  ... when != if (E == NULL) S1 else S2
      when != E = E1
* E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
---
 drivers/md/dm-mpath.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

Index: linux-2.6.26-rc8/drivers/md/dm-mpath.c
===================================================================
--- linux-2.6.26-rc8.orig/drivers/md/dm-mpath.c	2008-07-02 10:49:44.000000000 +0100
+++ linux-2.6.26-rc8/drivers/md/dm-mpath.c	2008-07-02 10:50:15.000000000 +0100
@@ -888,8 +888,7 @@ static int reinstate_path(struct pgpath 
 		goto out;
 
 	if (!pgpath->pg->ps.type) {
-		DMWARN("Reinstate path not supported by path selector %s",
-		       pgpath->pg->ps.type->name);
+		DMWARN("Reinstate path not supported by path selector");
 		r = -EINVAL;
 		goto out;
 	}
