[PATCH] s390:Use BUG_ON instead of if condition followed by BUG.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zhang Mingyu <zhang.mingyu@xxxxxxxxxx>

This issue was detected with the help of Coccinelle.

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Zhang Mingyu <zhang.mingyu@xxxxxxxxxx>
---
 arch/s390/mm/fault.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index d30f5986fa85..48a0231158c9 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -824,8 +824,7 @@ void do_secure_storage_access(struct pt_regs *regs)
 			break;
 		rc = arch_make_page_accessible(page);
 		put_page(page);
-		if (rc)
-			BUG();
+		BUG_ON(rc);
 		break;
 	case GMAP_FAULT:
 	default:
-- 
2.25.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux