Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net/mlx5: remove unreachable return
@ 2020-09-21 11:41 Pavel Machek
  2020-09-22  5:54 ` Saeed Mahameed
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2020-09-21 11:41 UTC (permalink / raw)
  To: eranbe, lariel, saeedm, saeedm, leon, davem, kuba, netdev,
	linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 824 bytes --]

The last return statement is unreachable code. I'm not sure if it will
provoke any warnings, but it looks ugly.
    
Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
index 2d55b7c22c03..a804f92ccf23 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
@@ -431,8 +431,6 @@ static int mlx5_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
 	default:
 		return -EOPNOTSUPP;
 	}
-
-	return -EOPNOTSUPP;
 }
 
 static const struct ptp_clock_info mlx5_ptp_clock_info = {


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-22 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 11:41 [PATCH] net/mlx5: remove unreachable return Pavel Machek
2020-09-22  5:54 ` Saeed Mahameed
2020-09-22 19:54   ` Saeed Mahameed
2020-09-22 20:05     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).