diff options
author | Ian Moffett <ian@osmora.org> | 2024-04-10 11:53:22 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-04-10 11:53:22 -0400 |
commit | 93adb32878463cfb92c9bad42f39587b0b267438 (patch) | |
tree | 55bb0157c6ba0042cbdd03ea30e27064f21e2e68 /sys/fs | |
parent | d1f3bd7b8282e32da0ca820caa337518a534ac53 (diff) |
kernel: devfs: Cleanup code and comments
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/devfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/devfs.c b/sys/fs/devfs.c index 0438b14..31a135f 100644 --- a/sys/fs/devfs.c +++ b/sys/fs/devfs.c @@ -77,6 +77,7 @@ blkdev_read(struct device *dev, struct device_node *node, struct sio_txn *sio) spinlock_acquire(&node->lock); buf = dynalloc_memalign(buf_size, 0x1000); + if (buf == NULL) { spinlock_release(&node->lock); return -ENOMEM; @@ -157,7 +158,8 @@ devfs_make_devicenode(const char *name, struct device_node **node_out) /* * Only one filename, no paths. * - * TODO: Do something better here... */ + * TODO: Do something better here... + */ for (; *p; ++p, ++name_len) { if (*p == '/') return -EINVAL; |