diff options
author | Travis Geiselbrecht <geist@foobox.com> | 2024-04-25 00:25:30 -0700 |
---|---|---|
committer | Travis Geiselbrecht <geist@foobox.com> | 2024-04-25 00:25:30 -0700 |
commit | ac5cd774a6721d35e22e6349b96379cf6cab2376 (patch) | |
tree | d7ce19461322e6e9f0567c7385ca70f3ea7fb4d0 | |
parent | 7cda17edfcc20680e0b184207193a10521a01e66 (diff) | |
download | lk-upstream-master.tar.gz |
[lib][fs][9p] fail mount gracefully if bdev isn't passedupstream-master
-rw-r--r-- | lib/fs/9p/v9fs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/fs/9p/v9fs.c b/lib/fs/9p/v9fs.c index eaedee20..c4555fe7 100644 --- a/lib/fs/9p/v9fs.c +++ b/lib/fs/9p/v9fs.c @@ -91,6 +91,10 @@ status_t v9fs_mount(bdev_t *dev, fscookie **cookie) LTRACEF("bdev (%p) cookie (%p)\n", dev, cookie); + if (!dev) { + return ERR_INVALID_ARGS; + } + v9fs_t *v9fs = calloc(1, sizeof(v9fs_t)); if (!v9fs) |