summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Pfau <dennis.pfau@dlr.de>2020-02-12 15:09:39 +0100
committerGedare Bloom <gedare@rtems.org>2020-02-20 09:57:27 -0700
commit7006f08b86755bcb363bfc74567860d9694c2622 (patch)
tree1f675e4cf83e7afce33619053cdca629e197f908
parent3f7ebddfa40a6cce1b9fe9ac0a8c71fd9695df14 (diff)
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.
-rw-r--r--bsps/shared/grlib/uart/apbuart_cons.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bsps/shared/grlib/uart/apbuart_cons.c b/bsps/shared/grlib/uart/apbuart_cons.c
index ee635e6944..e4d026a4cc 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"
*/