[rtems commit] drvmgr: Fix determination of prefix in grlib uart driver

Gedare Bloom gedare at rtems.org
Thu Feb 20 16:58:55 UTC 2020


Module:    rtems
Branch:    master
Commit:    7006f08b86755bcb363bfc74567860d9694c2622
Changeset: http://git.rtems.org/rtems/commit/?id=7006f08b86755bcb363bfc74567860d9694c2622

Author:    Dennis Pfau <dennis.pfau at dlr.de>
Date:      Wed Feb 12 15:09:39 2020 +0100

drvmgr: Fix determination of prefix in grlib uart driver

drvmgr_get_dev_prefix returns 0 if a prefix was found.
Therefore the if condition needs to check for 0, i.e. DRVMGR_OK.

---

 bsps/shared/grlib/uart/apbuart_cons.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bsps/shared/grlib/uart/apbuart_cons.c b/bsps/shared/grlib/uart/apbuart_cons.c
index ee635e6..e4d026a 100644
--- a/bsps/shared/grlib/uart/apbuart_cons.c
+++ b/bsps/shared/grlib/uart/apbuart_cons.c
@@ -321,7 +321,7 @@ int apbuart_init1(struct drvmgr_dev *dev)
 	priv->condev.fsname = NULL;
 	/* Get Filesystem name prefix */
 	prefix[0] = '\0';
-	if (drvmgr_get_dev_prefix(dev, prefix)) {
+	if (drvmgr_get_dev_prefix(dev, prefix) == DRVMGR_OK) {
 		/* Got special prefix, this means we have a bus prefix
 		 * And we should use our "bus minor"
 		 */



More information about the vc mailing list