Skip to content

Commit ebd507b

Browse files
anatolyburakovdavid-marchand
authored andcommitted
bus/cdx: fix device name in probing error message
The variable cdx_addr is a stack-allocated zero-initialized char array, but it is never used anywhere, except as part of error message out. The intention is to display device name, so fix the code to reflect that. Fixes: 45ef232 ("bus/cdx: introduce AMD CDX bus") Cc: [email protected] Signed-off-by: Anatoly Burakov <[email protected]> Acked-by: Nipun Gupta <[email protected]>
1 parent 1624f34 commit ebd507b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/bus/cdx/cdx_vfio.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ static int
389389
cdx_vfio_map_resource_primary(struct rte_cdx_device *dev)
390390
{
391391
struct vfio_device_info device_info = { .argsz = sizeof(device_info) };
392-
char cdx_addr[PATH_MAX] = {0};
393392
static void *cdx_map_addr;
394393
struct mapped_cdx_resource *vfio_res = NULL;
395394
struct mapped_cdx_res_list *vfio_res_list =
@@ -455,7 +454,7 @@ cdx_vfio_map_resource_primary(struct rte_cdx_device *dev)
455454
ret = cdx_vfio_mmap_resource(vfio_dev_fd, vfio_res, i, 0);
456455
if (ret < 0) {
457456
CDX_BUS_ERR("%s mapping region %i failed: %s",
458-
cdx_addr, i, strerror(errno));
457+
dev_name, i, strerror(errno));
459458
free(reg);
460459
goto err_vfio_res;
461460
}

0 commit comments

Comments
 (0)