mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 22:53:04 +00:00
iodev: Fix error returns for iodev_read/write
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
565753980a
commit
d3957cc89d
1 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ bool iodev_can_write(iodev_id_t id)
|
|||
ssize_t iodev_read(iodev_id_t id, void *buf, size_t length)
|
||||
{
|
||||
if (!iodevs[id]->ops->read)
|
||||
return false;
|
||||
return -1;
|
||||
|
||||
return iodevs[id]->ops->read(iodevs[id]->opaque, buf, length);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ ssize_t iodev_read(iodev_id_t id, void *buf, size_t length)
|
|||
ssize_t iodev_write(iodev_id_t id, const void *buf, size_t length)
|
||||
{
|
||||
if (!iodevs[id]->ops->write)
|
||||
return false;
|
||||
return -1;
|
||||
|
||||
return iodevs[id]->ops->write(iodevs[id]->opaque, buf, length);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue