drivers: disk: Fix USDHC driver to return 0 on success
The function usdhc_board_access_init was returning a non-zero value as the variable "ret" is also used to store the GPIO level for card-detect. Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
parent
be7faf7c08
commit
a90c4c38a1
1 changed files with 2 additions and 2 deletions
|
@ -2641,7 +2641,7 @@ static int usdhc_board_access_init(struct usdhc_priv *priv)
|
|||
priv->inserted = true;
|
||||
} else {
|
||||
priv->inserted = false;
|
||||
ret = -ENODEV;
|
||||
return -ENODEV;
|
||||
}
|
||||
} else {
|
||||
ret = usdhc_cd_gpio_init(priv->detect_gpio,
|
||||
|
@ -2668,7 +2668,7 @@ static int usdhc_board_access_init(struct usdhc_priv *priv)
|
|||
priv->inserted = true;
|
||||
LOG_INF("SD inserted!");
|
||||
}
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usdhc_access_init(const struct device *dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue