diff mbox series

[net] ibmvnic: add missing parenthesis in do_reset()

Message ID 20200905040749.2450572-1-kuba@kernel.org
State Accepted
Delegated to: David Miller
Headers show
Series [net] ibmvnic: add missing parenthesis in do_reset() | expand

Commit Message

Jakub Kicinski Sept. 5, 2020, 4:07 a.m. UTC
Indentation and logic clearly show that this code is missing
parenthesis.

Fixes: 9f1345737790 ("ibmvnic fix NULL tx_pools and rx_tools issue at do_reset")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: mmc@linux.vnet.ibm.com
CC: drt@linux.ibm.com
CC: tlfalcon@linux.ibm.com
CC: jallen@linux.ibm.com

I randomly noticed this when doing a net -> net-next merge.

Folks, please: (a) make more of an effort testing your code, especially
for fixes!, and (b) try making your code COMPILE_TEST-able, I'm 100% sure
buildbot would've caught this immediately if it wasn't for the arch
dependency.

 drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jakub Kicinski Sept. 7, 2020, 9:07 p.m. UTC | #1
On Fri,  4 Sep 2020 21:07:49 -0700 Jakub Kicinski wrote:
> Indentation and logic clearly show that this code is missing
> parenthesis.
> 
> Fixes: 9f1345737790 ("ibmvnic fix NULL tx_pools and rx_tools issue at do_reset")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Applied now.
Thomas Falcon Sept. 9, 2020, 6:10 p.m. UTC | #2
On 9/7/20 4:07 PM, Jakub Kicinski wrote:
> On Fri,  4 Sep 2020 21:07:49 -0700 Jakub Kicinski wrote:
>> Indentation and logic clearly show that this code is missing
>> parenthesis.
>>
>> Fixes: 9f1345737790 ("ibmvnic fix NULL tx_pools and rx_tools issue at do_reset")
>> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> Applied now.
Thanks for noticing that!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index d3a774331afc..1b702a43a5d0 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2032,16 +2032,18 @@  static int do_reset(struct ibmvnic_adapter *adapter,
 
 		} else {
 			rc = reset_tx_pools(adapter);
-			if (rc)
+			if (rc) {
 				netdev_dbg(adapter->netdev, "reset tx pools failed (%d)\n",
 						rc);
 				goto out;
+			}
 
 			rc = reset_rx_pools(adapter);
-			if (rc)
+			if (rc) {
 				netdev_dbg(adapter->netdev, "reset rx pools failed (%d)\n",
 						rc);
 				goto out;
+			}
 		}
 		ibmvnic_disable_irqs(adapter);
 	}