net: marvell: prestera: remove reduntant code
authorSebin Sebastian <mailmesebin00@gmail.com>
Mon, 1 Aug 2022 04:07:31 +0000 (09:37 +0530)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Aug 2022 03:32:07 +0000 (20:32 -0700)
Fixes the coverity warning 'EVALUATION_ORDER' violation. port is written
twice with the same value.

Signed-off-by: Sebin Sebastian <mailmesebin00@gmail.com>
Link: https://lore.kernel.org/r/20220801040731.34741-1-mailmesebin00@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/prestera/prestera_main.c

index 4b64bda..ede3e53 100644 (file)
@@ -290,7 +290,7 @@ static int prestera_pcs_config(struct phylink_pcs *pcs,
                               const unsigned long *advertising,
                               bool permit_pause_to_mac)
 {
-       struct prestera_port *port = port = prestera_pcs_to_port(pcs);
+       struct prestera_port *port = prestera_pcs_to_port(pcs);
        struct prestera_port_mac_config cfg_mac;
        int err;