Skip to contentSkip to conversation

ata: Replace BUG() with BUG_ON().

PATCH In review Harman Kalra 2 participants 2 messages Sep 21, 2016 – Sep 22, 2016 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: Replace BUG() with BUG_ON().

Replace BUG() with BUG_ON().
Caught by coccinelle.

---
 drivers/ata/pata_octeon_cf.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/ata/pata_octeon_cf.c +1 -2
index 2724595..475a006 100644
@@ -152,8 +152,7 @@ static void octeon_cf_set_piomode(struct ata_port *ap, struct ata_device *dev)
 		div = 8;
 	T = (int)((1000000000000LL * div) / octeon_get_io_clock_rate());
 
-	if (ata_timing_compute(dev, dev->pio_mode, &timing, T, T))
-		BUG();
+	BUG_ON(ata_timing_compute(dev, dev->pio_mode, &timing, T, T));
 
 	t1 = timing.setup;
 	if (t1)
Signature · 1 line
1.7.9.5