net: sun: fix missing release regions in cas_init_one().
authorQiushi Wu <wu000273@umn.edu>
Fri, 22 May 2020 21:50:27 +0000 (16:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2020 06:21:06 +0000 (08:21 +0200)
commitfcb4d5869e981738c5c3bd38a9a8fcdce8e012b6
treef03446981989ff95213e8afe7addfd60601f8fdb
parentd12fc818b0d809893ced78d2aa58548b77a1af81
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: 1f26dac32057 ("[NET]: Add Sun Cassini driver.")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/sun/cassini.c