Subject: Re: [PATCH] virtio_net: drop redundant err assignment in virtnet_probe()

From: Jakub Kicinski <[email-masked]>
Date: Mon, 25 May 2026 11:49:10 -0700

On Wed, 20 May 2026 18:23:09 +0800 Li Wang wrote:
> err is initialized to -ENOMEM at the start of virtnet_probe(), and no
> code path between that and the devm_kzalloc() failure can change
> err. Assigning -ENOMEM again before goto free therefore is redundant.

This is asking for a bug, someone may add code before this 
if () overriding err to 0. They are 130 lines apart!

If you want to removing something remove the inline init at the start
of the function. But FTR I think that'd also be pointless churn.