brcmfmac: fix error handling of irq_of_parse_and_map

Return value of irq_of_parse_and_map() is unsigned int, with 0
indicating failure, so testing for negative result never works.

Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Cc: stable@vger.kernel.org # v3.17
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Dmitry Torokhov 2014-11-14 14:12:21 -08:00 committed by John W. Linville
parent 8180bd47b0
commit 4c69f05eaa

View File

@ -40,8 +40,8 @@ void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev)
return;
irq = irq_of_parse_and_map(np, 0);
if (irq < 0) {
brcmf_err("interrupt could not be mapped: err=%d\n", irq);
if (!irq) {
brcmf_err("interrupt could not be mapped\n");
devm_kfree(dev, sdiodev->pdata);
return;
}