mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
soc: qcom: socinfo: Don't print anything if nothing found
Let's skip printing anything if there's nothing to see. This makes it so the file length is 0 instead of 1, for the newline, and helps scripts figure out if there's anything to see in these files. Cc: Sai Prakash Ranjan <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Reviewed-by: Sai Prakash Ranjan <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
This commit is contained in:
1 parent
d43b3a989b
commit
0d361b0ac1
1 file changed
+2
-2
@@ -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) \
|
||||
|
||||
Reference in new issue
Block a user