From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- super-intel.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/super-intel.c b/super-intel.c index b583b35..f776be9 100644 --- a/super-intel.c +++ b/super-intel.c @@ -2868,8 +2868,10 @@ static void fd2devname(int fd, char *name) dname[rv] = '\0'; nm = strrchr(dname, '/'); - nm++; - snprintf(name, MAX_RAID_SERIAL_LEN, "/dev/%s", nm); + if (nm) { + nm++; + snprintf(name, MAX_RAID_SERIAL_LEN, "/dev/%s", nm); + } } extern int scsi_get_serial(int fd, void *buf, size_t buf_len); -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html