[PATCH 4/6] fs: return error pointer not NULL from cdev_mount_default
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Jan 6 01:18:33 PST 2025
cdev_mount_default is documented to return error pointers on errors and
that's what's done everywhere inside the function, except for errors
from the last call to cdev_get_mount_path.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
fs/fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fs.c b/fs/fs.c
index a9d2cc7088e3..6d047f197640 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1152,7 +1152,7 @@ const char *cdev_mount_default(struct cdev *cdev, const char *fsoptions)
return ERR_PTR(ret);
}
- return cdev_get_mount_path(cdev);
+ return cdev_get_mount_path(cdev) ?: ERR_PTR(-ENODEV);
}
/*
--
2.39.5
More information about the barebox
mailing list