mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
32480293db
commit
38870253f1
2 changed files with 45 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue