mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
usbhost_storage.c: Fixed Bug in usbhost_freedevno(...), worked only for 'a'.
This commit is contained in:
committed by
patacongo
parent
02a9228c1f
commit
2a11ad520b
@@ -482,7 +482,7 @@ static int usbhost_allocdevno(FAR struct usbhost_state_s *priv)
|
|||||||
|
|
||||||
static void usbhost_freedevno(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)
|
if (devno >= 0 && devno < 26)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user