Skip to content

Commit bc90c7b

Browse files
bosheng1acrnsi-robot
authored andcommitted
dm: correct wrong input parameter when printing get edid error message
fix virtio_gpu_cmd_get_edid error print wrong input parameter to avoid devicemodel crash. Tracked-On: #8797 Signed-off-by: Xue Bosheng <bosheng.xue@intel.com>
1 parent d61d98c commit bc90c7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

devicemodel/hw/pci/virtio/virtio_gpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ virtio_gpu_cmd_get_edid(struct virtio_gpu_command *cmd)
566566
memset(&resp, 0, sizeof(resp));
567567
virtio_gpu_update_resp_fence(&cmd->hdr, &resp.hdr);
568568
if (req.scanout >= gpu->scanout_num) {
569-
pr_err("%s: Invalid scanout_id %d\n", req.scanout);
569+
pr_err("%s: Invalid scanout_id %d\n", __func__, req.scanout);
570570
resp.hdr.type = VIRTIO_GPU_RESP_ERR_INVALID_SCANOUT_ID;
571571
memcpy(cmd->iov[1].iov_base, &resp, sizeof(resp));
572572
return;

0 commit comments

Comments
 (0)