summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQiushi Wu <wu000273@umn.edu>2020-05-22 16:50:27 -0500
committerDavid S. Miller <davem@davemloft.net>2020-05-22 16:19:46 -0700
commit5a730153984dd13f82ffae93d7170d76eba204e9 (patch)
tree42932c9c633d739cfadb6370b84afb2e4cc58ce1 /drivers
parentbf655ba212dfd10d1c86afeee3f3372dbd731d46 (diff)
net: sun: fix missing release regions in cas_init_one().
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: 1f26dac32057 ("[NET]: Add Sun Cassini driver.") Signed-off-by: Qiushi Wu <wu000273@umn.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/sun/cassini.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index e6d1aa882fa5..f1c8615ab6f0 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -4963,7 +4963,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
@@ -5136,7 +5136,6 @@ err_out_iounmap:
err_out_free_res:
pci_release_regions(pdev);
-err_write_cacheline:
/* Try to restore it in case the error occurred after we
* set it.
*/