From: kishore.p@techveda.org (kishore.p at techveda.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] staging: vc04_services: Prefer BUG_ON instead of if condition followed by BUG.
Date: Sat, 23 Dec 2017 20:36:00 +0530 [thread overview]
Message-ID: <1514041560-28001-1-git-send-email-kishore.p@techveda.org> (raw)
From: Kishore KP <kishore.p@techveda.org>
Use BUG_ON instead of if condition followed by BUG.
Pointed out by Coccinelle.
Signed-off-by: Kishore KP <kishore.p@techveda.org>
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
---
Note:
- Patch was compile tested and built(ARCH=arm) on linux-next
(latest).
- No build issues reported.
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index 315b49c..7116f61 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -224,8 +224,7 @@ int vchiq_platform_init(struct platform_device *pdev, VCHIQ_STATE_T *state)
platform_state = (struct vchiq_2835_state *)state->platform_state;
- if (!platform_state->inited)
- BUG();
+ BUG_ON(!platform_state->inited);
return &platform_state->arm_state;
}
--
1.9.1
next reply other threads:[~2017-12-23 15:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-23 15:06 kishore.p at techveda.org [this message]
2017-12-23 16:04 ` [PATCH] staging: vc04_services: Prefer BUG_ON instead of if condition followed by BUG Stefan Wahren
2017-12-24 14:03 ` [PATCH v2] staging: vc04_services: Prefer WARN_ON_ONCE " kishore.p at techveda.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1514041560-28001-1-git-send-email-kishore.p@techveda.org \
--to=kishore.p@techveda.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox