Skip to content
Commit 073350f7 authored by Roland Stigge's avatar Roland Stigge Committed by Chris Ball
Browse files

mmc: mmc_spi: Fix return value evaluation of irq_of_parse_and_map()



When irq_of_parse_and_map() returns an error, it does as zero. But in
mmc_spi_get_pdata(), the error return case is compared against NO_IRQ.
This might work where NO_IRQ is zero (defaults to zero when undefined,
as on MIPS) but not where NO_IRQ is different, e.g. on ARM where it's -1.

This patch changes to comparison with 0 which is the error return value
of irq_of_parse_and_map().

Tested on ARM that mmc_spi is working now.

Signed-off-by: default avatarRoland Stigge <stigge@antcom.de>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 14006bfb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment