[S390] cio: dont forget to set last slot to NULL in ccw_uevent().
authorCornelia Huck <cornelia.huck@de.ibm.com>
Wed, 22 Aug 2007 11:51:36 +0000 (13:51 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 22 Aug 2007 11:51:46 +0000 (13:51 +0200)
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
drivers/s390/cio/device.c

index 297659fa0e26c80bd077092a12909b559f233f3e..e44d92eac8e9e8f80fb0f4c57f05b096bb3c494d 100644 (file)
@@ -117,7 +117,10 @@ static int ccw_uevent(struct device *dev, char **envp, int num_envp,
        snprint_alias(modalias_buf, sizeof(modalias_buf), id, "");
        ret = add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
                             "MODALIAS=%s", modalias_buf);
-       return ret;
+       if (ret)
+               return ret;
+       envp[i] = NULL;
+       return 0;
 }
 
 struct bus_type ccw_bus_type;