summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vendorcode/cavium/bdk/libbdk-hal/device/bdk-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vendorcode/cavium/bdk/libbdk-hal/device/bdk-device.c b/src/vendorcode/cavium/bdk/libbdk-hal/device/bdk-device.c
index a8e65f061a..0df70ebc47 100644
--- a/src/vendorcode/cavium/bdk/libbdk-hal/device/bdk-device.c
+++ b/src/vendorcode/cavium/bdk/libbdk-hal/device/bdk-device.c
@@ -519,7 +519,7 @@ int bdk_device_add(bdk_node_t node, int ecam, int bus, int dev, int func)
{
int grow = device_list_max + DEVICE_GROW;
bdk_device_t *tmp = malloc(grow * sizeof(bdk_device_t));
- if (!tmp)
+ if (tmp)
memcpy(tmp, device_list, device_list_max * sizeof(bdk_device_t));
free(device_list);
if (tmp == NULL)