summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2022-10-09 18:27:56 -0400
committerSolomon Peachy <pizza@shaftnet.org>2022-10-10 08:24:33 -0400
commitaf756195853a7a09104e6c9ea2ee4f15f3a16cf6 (patch)
treebfde5a7380b78a12c7463d3182999c69b1259365
parent5c6d6bd612cb520616ea913c9776947d4642b5ea (diff)
downloadrockbox-af75619585.tar.gz
rockbox-af75619585.zip
usb dwc2: Fix a potential garbage string print in an error path.
Change-Id: I56f8ee9bc883baac8707f136be396bb2669f911b
-rw-r--r--firmware/drivers/usb-designware.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/drivers/usb-designware.c b/firmware/drivers/usb-designware.c
index beecb5ea7a..862445f2e8 100644
--- a/firmware/drivers/usb-designware.c
+++ b/firmware/drivers/usb-designware.c
@@ -896,7 +896,7 @@ static void usb_dw_control_received(struct usb_ctrlrequest* req)
break;
default:
- panicf("%s: bad state=%s", __func__, dw_state_str[ep0.state]);
+ panicf("%s: bad state=%s", __func__, ep0.state >= EP0_NUM_STATES ? "unk" : dw_state_str[ep0.state]);
}
}