Message ID | 20210628030150.2627905-1-swboyd@chromium.org |
---|---|
State | Accepted |
Commit | 0d361b0ac1ad99ecbe401a4eacdeb844dcdf86a2 |
Headers | show |
Series | [PATCH/RESEND] soc: qcom: socinfo: Don't print anything if nothing found | expand |
diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index f6cfb79338f0..152f3e0e3c6c 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -373,8 +373,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) \