mfd: ab8500-debugfs: move dereference after check for NULL
PATCH 1/1 mfd: ab8500-debugfs: move dereference after check for NULL
We dereference "desc" before check if it is NULL. I've shifted it around so we check first before dereferencing.
Signed-off-by Dan Carpenter <[email protected]>
---
I am not able to compile this.
drivers/mfd/ab8500-debugfs.c +3 -2
@@ -1600,7 +1600,6 @@ static int ab8500_interrupts_print(struct seq_file *s, void *p)for (line =0 ; line < num_interrupt_lines; line++) {struct irq_desc *desc =irq_to_desc (line + irq_first); -struct irqaction *action = desc->action; seq_printf(s, "%3i: %6i %4i", line, num_interrupts[line],
@@ -1608,7 +1607,9 @@ static int ab8500_interrupts_print(struct seq_file *s, void *p)if (desc && desc->name)seq_printf (s,"-%-8s" , desc->name); -if (action) { +if (desc && desc->action) { +struct irqaction *action = desc->action; +seq_printf (s," %s" , action->name);while ((action = action->next) !=NULL )seq_printf (s,", %s" , action->name);
Quoted 6 lines · Dan Carpenter
We dereference "desc" before check if it is NULL. I've shifted it around so we check first before dereferencing.
Signed-off-by Dan Carpenter <[email protected]>---
I am not able to compile this.
Looks and compiles good.
Tested-by Linus Walleij <[email protected]>
Lee are you queueing this?
Yours,
Linus Walleij
Lee Jones
AppliedQuoted 5 lines · Linus Walleij
Quoted 3 lines · Dan Carpenter
We dereference "desc" before check if it is NULL. I've shifted it around so we check first before dereferencing.
Quoted 8 lines
Quoted 3 lines
Signed-off-by Dan Carpenter <[email protected]>---
I am not able to compile this.Looks and compiles good.
Tested-by Linus Walleij <[email protected]>Lee are you queueing this?
This one slipped through the net, thanks for bringing it to my attention.
Applied, thanks.
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html