Skip to contentSkip to conversation

powerpc: Fix ppc_rtas_progress_show()

PATCH New Segher Boessenkool 1 participant 1 message May 16, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix ppc_rtas_progress_show()

Fixes the warning

arch/powerpc/kernel/rtas-proc.c: In function 'ppc_rtas_progress_show':
arch/powerpc/kernel/rtas-proc.c:382: warning: the address of
'progress_led' will always evaluate as 'true'

by fixing the code to do what it presumably is meant to do.

---
 arch/powerpc/kernel/rtas-proc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kernel/rtas-proc.c +1 -1
index 190b7ed..f2e3bc7 100644
@@ -379,7 +379,7 @@ static ssize_t ppc_rtas_progress_write(struct file *file,
 /* ****************************************************************** */
 static int ppc_rtas_progress_show(struct seq_file *m, void *v)
 {
-	if (progress_led)
+	if (progress_led[0])
 		seq_printf(m, "%s\n", progress_led);
 	return 0;
 }
Signature · 1 line
1.5.2.rc0.g4342-dirty