Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1620da83 authored by Qiushi Wu's avatar Qiushi Wu Committed by Greg Kroah-Hartman
Browse files

net: sun: fix missing release regions in cas_init_one().



commit 5a730153984dd13f82ffae93d7170d76eba204e9 upstream.

In cas_init_one(), "pdev" is requested by "pci_request_regions", but it
was not released after a call of the function “pci_write_config_byte”
failed. Thus replace the jump target “err_write_cacheline” by
"err_out_free_res".

Fixes: 1f26dac3 ("[NET]: Add Sun Cassini driver.")
Signed-off-by: default avatarQiushi Wu <wu000273@umn.edu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 95fde2e4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -4971,7 +4971,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
					  cas_cacheline_size)) {
			dev_err(&pdev->dev, "Could not set PCI cache "
			       "line size\n");
			goto err_write_cacheline;
			goto err_out_free_res;
		}
	}
#endif
@@ -5144,7 +5144,6 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
err_out_free_res:
	pci_release_regions(pdev);

err_write_cacheline:
	/* Try to restore it in case the error occurred after we
	 * set it.
	 */