Module Name: src
Committed By: jmcneill
Date: Sun Jul 28 10:30:44 UTC 2019
Modified Files:
src/sys/dev/ic: dwc_mmc.c
Log Message:
Fix infinite loop in dwc_mmc_exec_command error path
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ic/dwc_mmc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/dwc_mmc.c
diff -u src/sys/dev/ic/dwc_mmc.c:1.16 src/sys/dev/ic/dwc_mmc.c:1.17
--- src/sys/dev/ic/dwc_mmc.c:1.16 Tue Apr 30 23:19:55 2019
+++ src/sys/dev/ic/dwc_mmc.c Sun Jul 28 10:30:44 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc.c,v 1.16 2019/04/30 23:19:55 jmcneill Exp $ */
+/* $NetBSD: dwc_mmc.c,v 1.17 2019/07/28 10:30:44 jmcneill Exp $ */
/*-
* Copyright (c) 2014-2017 Jared McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.16 2019/04/30 23:19:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.17 2019/07/28 10:30:44 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -625,7 +625,7 @@ dwc_mmc_exec_command(sdmmc_chipset_handl
DWC_MMC_IDST_ERROR | DWC_MMC_IDST_COMPLETE;
retry = 10;
while ((sc->sc_idma_idst & idst_mask) == 0) {
- if (retry == 0) {
+ if (--retry == 0) {
cmd->c_error = ETIMEDOUT;
break;
}