Skip to content

Commit 302b49d

Browse files
zhang jiaomstsirkin
authored andcommitted
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>
1 parent b989531 commit 302b49d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/virtio/virtio_balloon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static unsigned int fill_balloon(struct virtio_balloon *vb, size_t num)
251251

252252
for (num_pfns = 0; num_pfns < num;
253253
num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE) {
254-
struct page *page = balloon_page_alloc();
254+
page = balloon_page_alloc();
255255

256256
if (!page) {
257257
dev_info_ratelimited(&vb->vdev->dev,

0 commit comments

Comments
 (0)