diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2020-05-06 23:24:43 +0200 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2020-09-02 10:53:07 +0200 |
commit | d2987e6ebbda5c83f60d4e5cf0febd7a82df3a32 (patch) | |
tree | 9f8785612d918fb9efd2a24c40408c7776c8db2e | |
parent | 31cdf0da6073a8ee55e1de4b4d72c02f0105d698 (diff) |
leon,apbuart: sanity check name prefix before using
-rw-r--r-- | bsps/shared/grlib/uart/apbuart_cons.c | 2 |
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 e4d026a4cc..654bb0c92c 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) == DRVMGR_OK) { + if ((drvmgr_get_dev_prefix(dev, prefix) == DRVMGR_OK) && (prefix[0] != '\0')) { /* Got special prefix, this means we have a bus prefix * And we should use our "bus minor" */ |