summaryrefslogtreecommitdiffstats
path: root/lib/asn1_decoder.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2017-07-16 20:52:20 +0300
committerSebastian Reichel <sre@kernel.org>2017-07-24 14:09:00 +0200
commit648b8eba20d0bdce9de41df97677e70aa53693ea (patch)
treea70fbf75f4805c462bd85779c98531302d032bcd /lib/asn1_decoder.c
parent8b35bf5927b1e89e9b2f9ddbd701bd9b27456e78 (diff)
downloadblackbird-obmc-linux-648b8eba20d0bdce9de41df97677e70aa53693ea.tar.gz
blackbird-obmc-linux-648b8eba20d0bdce9de41df97677e70aa53693ea.zip
power: supply: act8945a_charger: fix of_irq_get() error check
of_irq_get() may return any negative error number as well as 0 on failure, while the driver only checks for -EPROBE_DEFER, blithely continuing with the call to devm_request_irq() -- that function expects *unsigned int*, so would probably fail anyway when a large IRQ number resulting from a conversion of a negative error number is passed to it... This, however, is incorrect behavior -- error number is not IRQ number. Check for 'irq <= 0' instead and return -ENXIO from probe if of_irq_get() returned 0. Fixes: a09209acd6a8 ("power: supply: act8945a_charger: Add status change update support") Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'lib/asn1_decoder.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud