Skip to contentSkip to conversation

mfd: ipaq-micro: Add missing break for the default case

PATCH Applied Andy Shevchenko 2 participants 2 messages Oct 16, 2024 – Oct 31, 2024 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: ipaq-micro: Add missing break for the default case

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.

---
 drivers/mfd/ipaq-micro.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/ipaq-micro.c +1 -0
index c964ea6539aa..2370b44e2214 100644
@@ -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);
 }
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
maintainer Applied
#1 lore raw

Re: (subset) [PATCH v1 1/1] mfd: ipaq-micro: Add missing break for the default case

Quoted 6 lines · Andy Shevchenko

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 [李琼斯]