]> git.baikalelectronics.ru Git - kernel.git/commitdiff
xen/netback: fix build warning
authorJuergen Gross <jgross@suse.com>
Wed, 7 Dec 2022 07:19:38 +0000 (08:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Dec 2022 10:30:47 +0000 (11:30 +0100)
[ Upstream commit 7dfa764e0223a324366a2a1fc056d4d9d4e95491 ]

Commit ad7f402ae4f4 ("xen/netback: Ensure protocol headers don't fall in
the non-linear area") introduced a (valid) build warning. There have
even been reports of this problem breaking networking of Xen guests.

Fixes: ad7f402ae4f4 ("xen/netback: Ensure protocol headers don't fall in the non-linear area")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/xen-netback/netback.c

index 982e501173f10d5943d7ae0fdea16a1ed742dd0f..036459670fc3311566dbda7b3d96727199485a6b 100644 (file)
@@ -523,7 +523,7 @@ static int xenvif_tx_check_gop(struct xenvif_queue *queue,
        const bool sharedslot = nr_frags &&
                                frag_get_pending_idx(&shinfo->frags[0]) ==
                                    copy_pending_idx(skb, copy_count(skb) - 1);
-       int i, err;
+       int i, err = 0;
 
        for (i = 0; i < copy_count(skb); i++) {
                int newerr;