ptp: fix missing break in switch
Subsystems (3)
PATCH 1/1 ptp: fix missing break in switch
It seems that a *break* is missing in order to avoid falling through to the default case. Otherwise, checking *chan* makes no sense.
--- drivers/ptp/ptp_chardev.c | 1 + 1 file changed, 1 insertion(+)
drivers/ptp/ptp_chardev.c +1 -0
@@ -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 ; }
Signature · 1 line
2.7.4
Quoted 2 lines · 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.
Good catch.
David Miller
maintainerFrom: "Gustavo A. R. Silva" <[email protected]>
Date: Tue, 17 Jul 2018 20:17:33 -0500
Quoted 5 lines
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 <[email protected]>
Applied and queued up for -stable, thank you.
Quoted 11 lines · David Miller
From: "Gustavo A. R. Silva" <[email protected]>
Date: Tue, 17 Jul 2018 20:17:33 -0500Quoted 5 lines
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 <[email protected]>Applied and queued up for -stable, thank you.
Great. Glad to help. :)
Thanks
--
Gustavo