All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ptp: fix missing break in switch
@ 2018-07-18  1:17 Gustavo A. R. Silva
  2018-07-18  3:46 ` Richard Cochran
  2018-07-18 22:26 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-18  1:17 UTC (permalink / raw)
  To: Stefan Sørensen, Richard Cochran, David S. Miller
  Cc: netdev, linux-kernel, Gustavo A. R. Silva

It seems that a *break* is missing in order to avoid falling through
to the default case. Otherwise, checking *chan* makes no sense.

Fixes: 72df7a7244c0 ("ptp: Allow reassigning calibration pin function")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/ptp/ptp_chardev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 547dbda..01b0e2b 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -89,6 +89,7 @@ int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin,
 	case PTP_PF_PHYSYNC:
 		if (chan != 0)
 			return -EINVAL;
+		break;
 	default:
 		return -EINVAL;
 	}
-- 
2.7.4


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

end of thread, other threads:[~2018-07-18 22:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-18  1:17 [PATCH] ptp: fix missing break in switch Gustavo A. R. Silva
2018-07-18  3:46 ` Richard Cochran
2018-07-18 22:26 ` David Miller
2018-07-18 22:39   ` Gustavo A. R. Silva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.