diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-01-26 12:01:23 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-02-14 06:09:32 -0500 |
commit | 99747b71baf278068b5938ccdc66d6c906ed437e (patch) | |
tree | 08258b202e6e1008f476da2aca0c0450174126df | |
parent | 0dbcc0ce2f7b7a98a11224add69b2f2f2b8125da (diff) | |
download | qemu-99747b71baf278068b5938ccdc66d6c906ed437e.zip qemu-99747b71baf278068b5938ccdc66d6c906ed437e.tar.gz qemu-99747b71baf278068b5938ccdc66d6c906ed437e.tar.bz2 |
hw/pci-bridge/cxl_upstream: Drop g_malloc() failure handling
As a failure of g_malloc() will result in QEMU exiting, it
won't return a NULL to check. As such, drop the incorrect handling
of such NULL returns in the cdat table building code.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240126120132.24248-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | hw/pci-bridge/cxl_upstream.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/hw/pci-bridge/cxl_upstream.c b/hw/pci-bridge/cxl_upstream.c index 3673718..d5341b5 100644 --- a/hw/pci-bridge/cxl_upstream.c +++ b/hw/pci-bridge/cxl_upstream.c @@ -228,9 +228,6 @@ static int build_cdat_table(CDATSubHeader ***cdat_table, void *priv) sslbis_size = sizeof(CDATSslbis) + sizeof(*sslbis_latency->sslbe) * count; sslbis_latency = g_malloc(sslbis_size); - if (!sslbis_latency) { - return -ENOMEM; - } *sslbis_latency = (CDATSslbis) { .sslbis_header = { .header = { @@ -251,9 +248,6 @@ static int build_cdat_table(CDATSubHeader ***cdat_table, void *priv) } sslbis_bandwidth = g_malloc(sslbis_size); - if (!sslbis_bandwidth) { - return 0; - } *sslbis_bandwidth = (CDATSslbis) { .sslbis_header = { .header = { |