linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tang Bin <tangbin@cmss.chinamobile.com>
To: minyard@acm.org, arnd@arndb.de, gregkh@linuxfoundation.org
Cc: openipmi-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	Tang Bin <tangbin@cmss.chinamobile.com>
Subject: [PATCH v2]ipmi:bt-bmc:Avoid unnecessary judgement
Date: Mon,  6 Apr 2020 12:34:15 +0800	[thread overview]
Message-ID: <20200406043415.12292-1-tangbin@cmss.chinamobile.com> (raw)

In this driver,only the platform_device and platform_driver
matches,can trigger bt_bmc_probe(),and the trigger mode is
just Device Tree.Thus remove redundant judgments.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
Changes from v1:
 - improve the commit message.

 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




             reply	other threads:[~2020-04-06  4:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06  4:34 Tang Bin [this message]
2020-04-07 13:40 ` [PATCH v2]ipmi:bt-bmc:Avoid unnecessary judgement Corey Minyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200406043415.12292-1-tangbin@cmss.chinamobile.com \
    --to=tangbin@cmss.chinamobile.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).