ionic: Add missing err handling for queue reconfig
authorNitya Sunkad <nitya.sunkad@amd.com>
Fri, 4 Aug 2023 20:56:22 +0000 (13:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Aug 2023 15:44:03 +0000 (16:44 +0100)
commit52417a95ff2d810dc31a68ae71102e741efea772
tree5e925368f1ffcf8eaab9b286c3740d182089fb28
parentb1c936e9af5dd08636d568736fc6075ed9d1d529
ionic: Add missing err handling for queue reconfig

ionic_start_queues_reconfig returns an error code if txrx_init fails.
Handle this error code in the relevant places.

This fixes a corner case where the device could get left in a detached
state if the CMB reconfig fails and the attempt to clean up the mess
also fails. Note that calling netif_device_attach when the netdev is
already attached does not lead to unexpected behavior.

Change goto name "errout" to "err_out" to maintain consistency across
goto statements.

Fixes: 40bc471dc714 ("ionic: add tx/rx-push support with device Component Memory Buffers")
Fixes: 6f7d6f0fd7a3 ("ionic: pull reset_queues into tx_timeout handler")
Signed-off-by: Nitya Sunkad <nitya.sunkad@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_lif.c