]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/edac/edac_mc_sysfs.c
Merge branch 'master' of ssh://master.kernel.org/home/ftp/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / drivers / edac / edac_mc_sysfs.c
index 479492819dba57da8d94bb546bf66996a32b18dc..ad218fe4942dfcf258273ee22f56776f3a0b23c2 100644 (file)
@@ -178,7 +178,11 @@ static ssize_t csrow_edac_mode_show(struct csrow_info *csrow, char *data,
 static ssize_t channel_dimm_label_show(struct csrow_info *csrow,
                                char *data, int channel)
 {
-       return snprintf(data, EDAC_MC_LABEL_LEN, "%s",
+       /* if field has not been initialized, there is nothing to send */
+       if (!csrow->channels[channel].label[0])
+               return 0;
+
+       return snprintf(data, EDAC_MC_LABEL_LEN, "%s\n",
                        csrow->channels[channel].label);
 }