diff options
author | Shawn Lin <shawn.lin@rock-chips.com> | 2016-11-02 15:24:00 +0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-12-05 10:31:08 +0100 |
commit | 5df0e8231f9518ee5ca3f58a0777556dd03addd6 (patch) | |
tree | 10824ce4a1a4dd724752600d94ac3518ec6b0f91 /drivers/mmc/core/sdio_cis.c | |
parent | 925ff3a7a334b3fe968ae15f07d22df21addad26 (diff) | |
download | lwn-5df0e8231f9518ee5ca3f58a0777556dd03addd6.tar.gz lwn-5df0e8231f9518ee5ca3f58a0777556dd03addd6.zip |
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.c | 3 |
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; |