Thread (1 message) 1 message, 1 author, 2023-06-14

Re: Fwd: [PATCH] net: microchip: sparx5: Remove unneeded variable

From: Steen Hegelund <steen.hegelund@microchip.com>
Date: 2023-06-14 11:30:44
Also in: linux-arm-kernel

Hi Bao,

I could not apply your patch as there seems to be no message id in the mail
headers.  I also could not find it on patchwork, so it seems like it has been
ignored there.

Could you please resend this with the proper details - otherwise the change
looks good to me.

BR
Steen

On Tue, 2023-06-13 at 17:53 +0800, baomingtong001@208suo.com wrote:
quoted hunk
 You don't often get email from baomingtong001@208suo.com. Learn why this is
important




EXTERNAL EMAIL: Do not click links or open attachments unless you know the
content is safe


Fix the following coccicheck warning:

drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c:1435:5-8: Unneeded
variable: "err".

Signed-off-by: Mingtong Bao <redacted>
---
 drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
index 3f87a5285a6d..03a9b226c9c5 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
@@ -1432,7 +1432,6 @@ static int sparx5_tc_flower_template_destroy(struct
net_device *ndev,
 {
     struct sparx5_port *port = netdev_priv(ndev);
     struct sparx5_tc_flower_template *ftp, *tmp;
-    int err = -ENOENT;
 
     /* Rules using the template are removed by the tc framework */
     list_for_each_entry_safe(ftp, tmp, &port->tc_templates, list) {
@@ -1447,7 +1446,7 @@ static int sparx5_tc_flower_template_destroy(struct
net_device *ndev,
         kfree(ftp);
         break;
     }
-    return err;
+    return -ENOENT;
 }
 
 int sparx5_tc_flower(struct net_device *ndev, struct flow_cls_offload *fco,
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help