ARM: pxa: pxa_cplds: signedness bug in probe
PATCH 1/1 ARM: pxa: pxa_cplds: signedness bug in probe
"base_irq" needs to be signed for the error handling to work. Also we can remove the initialization because we re-assign it later.
Fixes aa8d6b73ea33 ('ARM: pxa: pxa_cplds: add lubbock and mainstone IO')
Signed-off-by Dan Carpenter <[email protected]>
arch/arm/mach-pxa/pxa_cplds_irqs.c +1 -1
@@ -107,7 +107,7 @@ static int cplds_probe(struct platform_device *pdev)struct resource *res;struct cplds *fpga;int ret; -unsigned int base_irq =0 ; +int base_irq;unsigned long irqflags =0 ; fpga =devm_kzalloc (&pdev->dev,sizeof (*fpga),GFP_KERNEL );
Robert Jarzmik
maintainerQuoted 2 lines · Dan Carpenter
"
base_irq" needs to be signed for the error handling to work. Also we can remove the initialization because we re-assign it later.
Indeed.
I suppose smatch found this one with :
arch/arm/mach-pxa/pxa_cplds_irqs.c:126 cplds_probe() warn: unsigned 'base_irq' is never less than zero.
I still don't see which tool found the "re-assign" part ...
Anyway, thanks for this, I'll queue it in pxa/fixes.
Cheers.
--
Robert