lkml.org 
[lkml]   [2020]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ipmi:bt-bmc:avoid unnecessary judgement
Date
In this function,it will only trigger ifdevice and driver match,and
the driver has already used the device tree, so the judgement here is
unnecessary.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
drivers/char/ipmi/bt-bmc.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index d36aeacb2..890ad55aa 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -430,9 +430,6 @@ static int bt_bmc_probe(struct platform_device *pdev)
struct device *dev;
int rc;

- if (!pdev || !pdev->dev.of_node)
- return -ENODEV;
-
dev = &pdev->dev;
dev_info(dev, "Found bt bmc device\n");

--
2.20.1.windows.1


\
 
 \ /
  Last update: 2020-04-01 03:29    [W:0.272 / U:3.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site