mwifiex: check if mwifiex_sdio_probe_of() fails and return error

The function can fail so the returned value should be checked
and the error propagated to the caller in case of a failure.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Javier Martinez Canillas 2016-05-27 10:18:20 -04:00 committed by Kalle Valo
parent d3f04ece53
commit 213d9421c1
1 changed files with 7 additions and 2 deletions

View File

@ -187,8 +187,13 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
}
/* device tree node parsing and platform specific configuration*/
if (func->dev.of_node)
mwifiex_sdio_probe_of(&func->dev, card);
if (func->dev.of_node) {
ret = mwifiex_sdio_probe_of(&func->dev, card);
if (ret) {
dev_err(&func->dev, "SDIO dt node parse failed\n");
goto err_disable;
}
}
ret = mwifiex_add_card(card, &add_remove_card_sem, &sdio_ops,
MWIFIEX_SDIO);