Use BUG_ON() instead of an if condition followed by BUG(). The semantic patch that makes this change is available in scripts/coccinelle/misc/bugon.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> --- drivers/pci/ats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c index a8099d4..1c25b20 100644 --- a/drivers/pci/ats.c +++ b/drivers/pci/ats.c @@ -134,8 +134,7 @@ void pci_restore_ats_state(struct pci_dev *dev) if (!pci_ats_enabled(dev)) return; - if (!pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ATS)) - BUG(); + BUG_ON(!pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ATS)); ctrl = PCI_ATS_CTRL_ENABLE; if (!dev->is_virtfn) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html