From 2a11ad520b66f9539dca808ab3f138f46d49e473 Mon Sep 17 00:00:00 2001 From: Johannes Schock Date: Sun, 9 Aug 2020 19:12:17 +0200 Subject: [PATCH] usbhost_storage.c: Fixed Bug in usbhost_freedevno(...), worked only for 'a'. --- drivers/usbhost/usbhost_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usbhost/usbhost_storage.c b/drivers/usbhost/usbhost_storage.c index fb398863732..0fe12198b4d 100644 --- a/drivers/usbhost/usbhost_storage.c +++ b/drivers/usbhost/usbhost_storage.c @@ -482,7 +482,7 @@ static int usbhost_allocdevno(FAR struct usbhost_state_s *priv) static void usbhost_freedevno(FAR struct usbhost_state_s *priv) { - int devno = 'a' - priv->sdchar; + int devno = priv->sdchar - 'a'; if (devno >= 0 && devno < 26) {