Commit 95b3c9cf authored by Stefano Garzarella's avatar Stefano Garzarella Committed by Laurent Vivier
Browse files

virtio-blk: remove duplicate definition of VirtIOBlock *s pointer



VirtIOBlock *s is already defined and initialized with req->dev
on top of virtio_blk_handle_request(), so we can remove it from
the code block of VIRTIO_BLK_T_GET_ID case.

Signed-off-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Message-Id: <20190130095231.42081-1-sgarzare@redhat.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 36f1f0d2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -569,8 +569,6 @@ static int virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
        break;
    case VIRTIO_BLK_T_GET_ID:
    {
        VirtIOBlock *s = req->dev;

        /*
         * NB: per existing s/n string convention the string is
         * terminated by '\0' only when shorter than buffer.