aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorzhang jiao <zhangjiao2@cmss.chinamobile.com>2024-11-20 13:49:20 +0800
committerMichael S. Tsirkin <mst@redhat.com>2025-01-08 07:29:05 -0500
commit302b49daf0c75cafd0719eadf09127abf5a69e50 (patch)
tree5d0107141215c45e5a439dc851273e856665eb9c /drivers/virtio
parentvduse: relicense under GPL-2.0 OR BSD-3-Clause (diff)
downloadlinux-302b49daf0c75cafd0719eadf09127abf5a69e50.tar.gz
linux-302b49daf0c75cafd0719eadf09127abf5a69e50.zip
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 <zhangjiao2@cmss.chinamobile.com> Message-Id: <20241120054920.35291-1-zhangjiao2@cmss.chinamobile.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_balloon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index b36d2803674e..89da052f4f68 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,