From a47f6e08edd3fbb915a79f0b4d23cbc7586ef897 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 16 Oct 2013 21:45:00 +0100 Subject: [PATCH] staging:iio:spear_adc: Fix IRQ check The test in the spear_adc driver which checks whether the IRQ number returned by platform_get_irq() has multiple problems. It accepts 0 even though this is an invalid IRQ. It also rejects IRQ numbers that are larger or equal than NR_IRQS. First of all drivers should never need to reference NR_IRQS and secondly with CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check might reject valid IRQ numbers. This patch modifies the check to only test against less or equal to 0. Signed-off-by: Lars-Peter Clausen Reported-by: kbuild test robot Cc: Stefan Roese Signed-off-by: Jonathan Cameron --- Reading git-format-patch failed