summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-07-17 20:17:33 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-25 11:26:11 +0200
commit7e6d5d531f87000d6cd61588073971b441068c41 (patch)
treeaa2007be11f0de3ffc3aa016f86c6012b6e2a5e0
parentfeb31042cf45e07c5aa81f8d6d993290ec1d558e (diff)
downloadlinux-stable-7e6d5d531f87000d6cd61588073971b441068c41.tar.gz
linux-stable-7e6d5d531f87000d6cd61588073971b441068c41.tar.bz2
linux-stable-7e6d5d531f87000d6cd61588073971b441068c41.zip
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 <gustavo@embeddedor.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/ptp/ptp_chardev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 767c485af59b..522719b494f3 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;
}