aboutsummaryrefslogtreecommitdiff
path: root/hw/cec.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/cec.c')
-rw-r--r--hw/cec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/cec.c b/hw/cec.c
index 1743f4d..2f56e81 100644
--- a/hw/cec.c
+++ b/hw/cec.c
@@ -72,6 +72,9 @@ static int64_t opal_pci_get_hub_diag_data(uint64_t hub_id,
{
struct io_hub *hub = cec_get_hub_by_id(hub_id);
+ if (!opal_addr_valid(diag_buffer))
+ return OPAL_PARAMETER;
+
if (!hub)
return OPAL_PARAMETER;