wlcore: sdio: return correct error code
authorRaphaël Poggi <poggi.raph@gmail.com>
Thu, 2 Jul 2015 08:34:49 +0000 (10:34 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Jul 2015 13:54:15 +0000 (16:54 +0300)
When wlcore_probe_of failed, return the correct error code instead of ENOMEM

Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wlcore/sdio.c

index ea7e07abca4ebaccd37eaa1aac75567453b3e0a0..c172da56b550b8a59f88f5206a0160c1a878f5bb 100644 (file)
@@ -293,7 +293,8 @@ static int wl1271_probe(struct sdio_func *func,
        /* Use block mode for transferring over one block size of data */
        func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
 
-       if (wlcore_probe_of(&func->dev, &irq, &pdev_data))
+       ret = wlcore_probe_of(&func->dev, &irq, &pdev_data);
+       if (ret)
                goto out_free_glue;
 
        /* if sdio can keep power while host is suspended, enable wow */