Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pcmcia/electra_cf: Fix some return values in 'electra_cf_probe()' in case of error

'status' is known to be 0 at this point. It must be set to a meaningful
value in order to return an error code if one of the 'of_get_property()'
call fails.

Return -EINVAL in such a case.

Fixes: 2b571a066a2f("pcmcia: CompactFlash driver for PA Semi Electra boards")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

authored by

Christophe JAILLET and committed by
Dominik Brodowski
f15480e9 b3298500

+2
+2
drivers/pcmcia/electra_cf.c
··· 229 229 230 230 cf->socket.pci_irq = cf->irq; 231 231 232 + status = -EINVAL; 233 + 232 234 prop = of_get_property(np, "card-detect-gpio", NULL); 233 235 if (!prop) 234 236 goto fail1;