[PATCH] ipmi:bt-bcm:use platform_get_irq_optional() to simplify code
From: Tang Bin
Date: Tue Mar 31 2020 - 22:09:11 EST
In this function's reference function 'bt_bmc_probe()',there are
judgments of print message about 'bt_bmc->irq',so use
platform_get_irq_optional() instead of platform_get_irq() to avoid
redundant dev_err() message.
Signed-off-by: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>
---
drivers/char/ipmi/bt-bmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index 890ad55aa..766e0e5bf 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -399,7 +399,7 @@ static int bt_bmc_config_irq(struct bt_bmc *bt_bmc,
struct device *dev = &pdev->dev;
int rc;
- bt_bmc->irq = platform_get_irq(pdev, 0);
+ bt_bmc->irq = platform_get_irq_optional(pdev, 0);
if (!bt_bmc->irq)
return -ENODEV;
--
2.20.1.windows.1