diff options
author | Titus Rwantare <titusr@google.com> | 2022-03-07 12:05:58 -0800 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2022-03-08 18:46:48 +0100 |
commit | 38870253f1d17f872f4d2a9c6d8e2989ec3706a9 (patch) | |
tree | 7ddf07594dd3b7c70c705d40e1fe7119911abe5e /include/hw | |
parent | 32480293db49e98c8dc891764caf726e4aa4d2a6 (diff) | |
download | qemu-38870253f1d17f872f4d2a9c6d8e2989ec3706a9.zip qemu-38870253f1d17f872f4d2a9c6d8e2989ec3706a9.tar.gz qemu-38870253f1d17f872f4d2a9c6d8e2989ec3706a9.tar.bz2 |
hw/i2c: pmbus: fix error returns and guard against out of range accesses
Signed-off-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-Id: <20220307200605.4001451-3-titusr@google.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/i2c/pmbus_device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/i2c/pmbus_device.h b/include/hw/i2c/pmbus_device.h index 72c0483..bab4526 100644 --- a/include/hw/i2c/pmbus_device.h +++ b/include/hw/i2c/pmbus_device.h @@ -228,6 +228,8 @@ enum pmbus_registers { #define PB_MAX_PAGES 0x1F #define PB_ALL_PAGES 0xFF +#define PMBUS_ERR_BYTE 0xFF + #define TYPE_PMBUS_DEVICE "pmbus-device" OBJECT_DECLARE_TYPE(PMBusDevice, PMBusDeviceClass, PMBUS_DEVICE) |