From: Lars-Peter Clausen Date: Wed, 16 Oct 2013 20:45:00 +0000 (+0100) Subject: staging:iio:lpc32xx_adc: Fix IRQ check X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~62^2~196^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2918ad14cc7e16f38206185dbc65f980ffc4ec6c;p=pandora-kernel.git staging:iio:lpc32xx_adc: Fix IRQ check The test in the lpc32xx_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: Roland Stigge Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed