From: Tang Bin Date: Wed, 8 Apr 2020 11:59:58 +0000 (+0800) Subject: ipmi:bt-bmc: Avoid unnecessary check X-Git-Tag: v5.8-rc1~129^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b671eed0cf069839c4e73b66d88ec483ee6c3f5;p=thirdparty%2Fkernel%2Flinux.git ipmi:bt-bmc: Avoid unnecessary check bt_bmc_probe() is only called with an openfirmware platform device. Therefore there is no need to check that the passed in device is NULL or that it has an openfirmware node. Signed-off-by: Tang Bin Message-Id: <20200408115958.2848-1-tangbin@cmss.chinamobile.com> [Fixed the title up a bit.] Signed-off-by: Corey Minyard --- diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c index d36aeacb290ed..890ad55aae790 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");