Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167917771
D22043.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22043.diff
View Options
Index: head/sys/dev/mmc/host/dwmmc.c
===================================================================
--- head/sys/dev/mmc/host/dwmmc.c
+++ head/sys/dev/mmc/host/dwmmc.c
@@ -457,20 +457,32 @@
/* IP block reset is optional */
error = hwreset_get_by_ofw_name(sc->dev, 0, "reset", &sc->hwreset);
- if (error != 0 && error != ENOENT)
+ if (error != 0 &&
+ error != ENOENT &&
+ error != ENODEV) {
device_printf(sc->dev, "Cannot get reset\n");
+ goto fail;
+ }
/* vmmc regulator is optional */
error = regulator_get_by_ofw_property(sc->dev, 0, "vmmc-supply",
&sc->vmmc);
- if (error != 0 && error != ENOENT)
+ if (error != 0 &&
+ error != ENOENT &&
+ error != ENODEV) {
device_printf(sc->dev, "Cannot get regulator 'vmmc-supply'\n");
+ goto fail;
+ }
/* vqmmc regulator is optional */
error = regulator_get_by_ofw_property(sc->dev, 0, "vqmmc-supply",
&sc->vqmmc);
- if (error != 0 && error != ENOENT)
+ if (error != 0 &&
+ error != ENOENT &&
+ error != ENODEV) {
device_printf(sc->dev, "Cannot get regulator 'vqmmc-supply'\n");
+ goto fail;
+ }
/* Assert reset first */
if (sc->hwreset != NULL) {
@@ -483,8 +495,12 @@
/* BIU (Bus Interface Unit clock) is optional */
error = clk_get_by_ofw_name(sc->dev, 0, "biu", &sc->biu);
- if (error != 0 && error != ENOENT)
+ if (error != 0 &&
+ error != ENOENT &&
+ error != ENODEV) {
device_printf(sc->dev, "Cannot get 'biu' clock\n");
+ goto fail;
+ }
if (sc->biu) {
error = clk_enable(sc->biu);
@@ -499,8 +515,12 @@
* if no clock-frequency property is given
*/
error = clk_get_by_ofw_name(sc->dev, 0, "ciu", &sc->ciu);
- if (error != 0 && error != ENOENT)
+ if (error != 0 &&
+ error != ENOENT &&
+ error != ENODEV) {
device_printf(sc->dev, "Cannot get 'ciu' clock\n");
+ goto fail;
+ }
if (sc->ciu) {
if (bus_hz != 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 26, 10:27 AM (22 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37243413
Default Alt Text
D22043.diff (1 KB)
Attached To
Mode
D22043: Fix dwmmc(4) attachment
Attached
Detach File
Event Timeline
Log In to Comment