* [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
* Re: [PATCH] ptp: fix missing break in switch
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
1 sibling, 0 replies; 4+ messages in thread
From: Richard Cochran @ 2018-07-18 3:46 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Stefan Sørensen, David S. Miller, netdev, linux-kernel
On Tue, Jul 17, 2018 at 08:17:33PM -0500, Gustavo A. R. Silva wrote:
> 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.
Acked-by: Richard Cochran <richardcochran@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ptp: fix missing break in switch
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
1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2018-07-18 22:26 UTC (permalink / raw)
To: gustavo; +Cc: stefan.sorensen, richardcochran, netdev, linux-kernel
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Tue, 17 Jul 2018 20:17:33 -0500
> 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>
Applied and queued up for -stable, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ptp: fix missing break in switch
2018-07-18 22:26 ` David Miller
@ 2018-07-18 22:39 ` Gustavo A. R. Silva
0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-18 22:39 UTC (permalink / raw)
To: David Miller; +Cc: stefan.sorensen, richardcochran, netdev, linux-kernel
On 07/18/2018 05:26 PM, David Miller wrote:
> From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> Date: Tue, 17 Jul 2018 20:17:33 -0500
>
>> 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>
>
> Applied and queued up for -stable, thank you.
>
Great. Glad to help. :)
Thanks
--
Gustavo
^ permalink raw reply [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.