From: Gustavo A. R. Silva Date: Wed, 18 Jul 2018 01:17:33 +0000 (-0500) Subject: ptp: fix missing break in switch X-Git-Tag: v4.9.115~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ac2bc675cfc0c77da9a1dcd72b6340acbcd8a29;p=platform%2Fkernel%2Flinux-amlogic.git ptp: fix missing break in switch [ Upstream commit 9ba8376ce1e2cbf4ce44f7e4bee1d0648e10d594 ] 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 Acked-by: Richard Cochran Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index 58a97d4..5136462 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; }