From: Sergio Paracuellos Date: Mon, 23 Apr 2018 13:44:44 +0000 (+0200) Subject: staging: ks7010: check sdio_set_block_size return value X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=31d7b1b142a17764ab9f21e37c02163b518d571b;p=openwrt%2Fstaging%2Fblogic.git staging: ks7010: check sdio_set_block_size return value This commit checks sdio_set_block_size function return value. If it fails abort driver initialization. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index fe4beb04f010..1d569ef96f45 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -994,6 +994,9 @@ static int ks7010_sdio_probe(struct sdio_func *func, sdio_claim_host(func); ret = sdio_set_block_size(func, KS7010_IO_BLOCK_SIZE); + if (ret) + goto err_free_card; + dev_dbg(&card->func->dev, "multi_block=%d sdio_set_block_size()=%d %d\n", func->card->cccr.multi_block, func->cur_blksize, ret);