public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: olpc_dcon: Use WARN_ON() instead of BUG_ON()
@ 2019-04-05 19:28 Madhumitha Prabakaran
  2019-04-16 11:43 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Madhumitha Prabakaran @ 2019-04-05 19:28 UTC (permalink / raw)
  To: jfrederich, dsd, jon.nettleton, gregkh, devel, linux-kernel
  Cc: Madhumitha Prabakaran

Use WARN_ON() instead of BUG_ON(), as the WARN_ON() produces a backtrace
without crashing the kernel.

Issue found by checkpatch.pl.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
---
 drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 6b714f740ac3..900baab70691 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -138,7 +138,7 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down)
 	}
 	if (x < 0) {
 		pr_err("unable to stabilize dcon's smbus, reasserting power and praying.\n");
-		BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
+		WARN_ON(olpc_board_at_least(olpc_board(0xc2)));
 		pm = 0;
 		olpc_ec_cmd(EC_DCON_POWER_MODE, &pm, 1, NULL, 0);
 		msleep(100);
-- 
2.17.1


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

end of thread, other threads:[~2019-04-16 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-05 19:28 [PATCH] Staging: olpc_dcon: Use WARN_ON() instead of BUG_ON() Madhumitha Prabakaran
2019-04-16 11:43 ` Greg KH

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