summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/sdio_cis.c
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-11-02 10:24:00 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2016-12-05 12:31:08 +0300
commit5df0e8231f9518ee5ca3f58a0777556dd03addd6 (patch)
tree10824ce4a1a4dd724752600d94ac3518ec6b0f91 /drivers/mmc/core/sdio_cis.c
parent925ff3a7a334b3fe968ae15f07d22df21addad26 (diff)
downloadlinux-5df0e8231f9518ee5ca3f58a0777556dd03addd6.tar.xz
mmc: core: remove BUG_ONs from sdio
BUG_ONs doesn't help anything except for stop the system from running. If it occurs, it implies we should deploy proper error handling for that. So this patch is gonna discard these meaningless BUG_ONs and deploy error handling if needed. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/sdio_cis.c')
-rw-r--r--drivers/mmc/core/sdio_cis.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c
index dcb3dee59fa5..f8c372839d24 100644
--- a/drivers/mmc/core/sdio_cis.c
+++ b/drivers/mmc/core/sdio_cis.c
@@ -262,7 +262,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
else
prev = &card->tuples;
- BUG_ON(*prev);
+ if (*prev)
+ return -EINVAL;
do {
unsigned char tpl_code, tpl_link;