From: zhang jiao Date: Wed, 20 Nov 2024 05:49:20 +0000 (+0800) Subject: virtio_balloon: Use outer variable 'page' X-Git-Tag: v6.14-rc1~72^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=302b49daf0c75cafd0719eadf09127abf5a69e50;p=thirdparty%2Fkernel%2Flinux.git virtio_balloon: Use outer variable 'page' There is no need to define a local variable 'page', just use outer variable 'page'. Signed-off-by: zhang jiao Message-Id: <20241120054920.35291-1-zhangjiao2@cmss.chinamobile.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand Reviewed-by: Gavin Shan --- diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index b36d2803674ef..89da052f4f687 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -251,7 +251,7 @@ static unsigned int fill_balloon(struct virtio_balloon *vb, size_t num) for (num_pfns = 0; num_pfns < num; num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE) { - struct page *page = balloon_page_alloc(); + page = balloon_page_alloc(); if (!page) { dev_info_ratelimited(&vb->vdev->dev,