mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] mfd: ipaq-micro: Add missing break for the default case
@ 2024-10-16 13:00 Andy Shevchenko
  2024-10-31 14:59 ` (subset) " Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-10-16 13:00 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Lee Jones

Even default case should have a break statement to make code robust
against changes (e.g., adding a case after the default one).

Add missing break for the default case.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/ipaq-micro.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
index c964ea6539aa..2370b44e2214 100644
--- a/drivers/mfd/ipaq-micro.c
+++ b/drivers/mfd/ipaq-micro.c
@@ -130,6 +130,7 @@ static void micro_rx_msg(struct ipaq_micro *micro, u8 id, int len, u8 *data)
 	default:
 		dev_err(micro->dev,
 			"unknown msg %d [%d] %*ph\n", id, len, len, data);
+		break;
 	}
 	spin_unlock(&micro->lock);
 }
-- 
2.43.0.rc1.1336.g36b5255a03ac


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

* Re: (subset) [PATCH v1 1/1] mfd: ipaq-micro: Add missing break for the default case
  2024-10-16 13:00 [PATCH v1 1/1] mfd: ipaq-micro: Add missing break for the default case Andy Shevchenko
@ 2024-10-31 14:59 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2024-10-31 14:59 UTC (permalink / raw)
  To: linux-kernel, Andy Shevchenko; +Cc: Lee Jones

On Wed, 16 Oct 2024 16:00:23 +0300, Andy Shevchenko wrote:
> Even default case should have a break statement to make code robust
> against changes (e.g., adding a case after the default one).
> 
> Add missing break for the default case.
> 
> 

Applied, thanks!

[1/1] mfd: ipaq-micro: Add missing break for the default case
      commit: 3d1c3272a80952617158a9149bebcebb4463a4fd

--
Lee Jones [李琼斯]


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

end of thread, other threads:[~2024-10-31 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-16 13:00 [PATCH v1 1/1] mfd: ipaq-micro: Add missing break for the default case Andy Shevchenko
2024-10-31 14:59 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®