Merge tag 'drivers-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux-2.6-microblaze.git] / drivers / soc / qcom / socinfo.c
index b2f049f..9faf483 100644 (file)
@@ -417,8 +417,8 @@ QCOM_OPEN(chip_id, qcom_show_chip_id);
 static int show_image_##type(struct seq_file *seq, void *p)              \
 {                                                                \
        struct smem_image_version *image_version = seq->private;  \
-       seq_puts(seq, image_version->type);                       \
-       seq_putc(seq, '\n');                                      \
+       if (image_version->type[0] != '\0')                       \
+               seq_printf(seq, "%s\n", image_version->type);     \
        return 0;                                                 \
 }                                                                \
 static int open_image_##type(struct inode *inode, struct file *file)     \