Thread (6 messages) flat view 6 messages, 3 authors, 2021-10-23

RE: [EXT] [PATCH net-next v2 1/2] net: qed_ptp: fix redundant check of rc and against -EINVAL

From: Prabhakar Kushwaha <hidden>
Date: 2021-10-22 05:27:57

-----Original Message-----
From: Jεan Sacren <redacted>
Sent: Friday, October 22, 2021 9:08 AM
To: Ariel Elior <redacted>
Cc: GR-everest-linux-l2 <redacted>;
davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org
Subject: [EXT] [PATCH net-next v2 1/2] net: qed_ptp: fix redundant check of rc
and against -EINVAL

External Email

----------------------------------------------------------------------
From: Jean Sacren <redacted>

We should first check rc alone and then check it against -EINVAL to
avoid repeating the same operation.

We should also remove the check of !rc in (!rc && !params.b_granted)
since it is always true.

With this change, we could also use constant 0 for return.

Signed-off-by: Jean Sacren <redacted>
Reviewed-by: Simon Horman <horms@kernel.org>
---
Acked-by: Prabhakar Kushwaha <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help