From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Lu Wei <luwei32@huawei.com>, Hulk Robot <hulkci@huawei.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Sasha Levin <sashal@kernel.org>,
platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 20/40] platform/x86: intel-vbtn: Fix return value check in check_acpi_dev()
Date: Sat, 8 Aug 2020 19:38:24 -0400 [thread overview]
Message-ID: <20200808233844.3618823-20-sashal@kernel.org> (raw)
In-Reply-To: <20200808233844.3618823-1-sashal@kernel.org>
From: Lu Wei <luwei32@huawei.com>
[ Upstream commit 64dd4a5a7d214a07e3d9f40227ec30ac8ba8796e ]
In the function check_acpi_dev(), if it fails to create
platform device, the return value is ERR_PTR() or NULL.
Thus it must use IS_ERR_OR_NULL() to check return value.
Fixes: 332e081225fc ("intel-vbtn: new driver for Intel Virtual Button")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/intel-vbtn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index cb2a80fdd8f46..3393ee95077f6 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -286,7 +286,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK;
if (acpi_match_device_ids(dev, ids) == 0)
- if (acpi_create_platform_device(dev, NULL))
+ if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
dev_info(&dev->dev,
"intel-vbtn: created platform device\n");
--
2.25.1
next prev parent reply other threads:[~2020-08-08 23:44 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-08 23:38 [PATCH AUTOSEL 5.4 01/40] x86/mce/inject: Fix a wrong assignment of i_mce.status Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 02/40] sched/fair: Fix NOHZ next idle balance Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 03/40] sched: correct SD_flags returned by tl->sd_flags() Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 04/40] arm64: dts: rockchip: fix rk3368-lion gmac reset gpio Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 05/40] arm64: dts: rockchip: fix rk3399-puma vcc5v0-host gpio Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 06/40] arm64: dts: rockchip: fix rk3399-puma gmac reset gpio Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 07/40] EDAC: Fix reference count leaks Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 08/40] crc-t10dif: Fix potential crypto notify dead-lock Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 09/40] arm64: dts: qcom: msm8916: Replace invalid bias-pull-none property Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 10/40] blktrace: fix debugfs use after free Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 11/40] crypto: ccree - fix resource leak on error path Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 12/40] ARM: exynos: MCPM: Restore big.LITTLE cpuidle support Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 13/40] firmware: arm_scmi: Fix SCMI genpd domain probing Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 14/40] arm64: dts: exynos: Fix silent hang after boot on Espresso Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 15/40] sched/uclamp: Fix initialization of struct uclamp_rq Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 16/40] clk: scmi: Fix min and max rate when registering clocks with discrete rates Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 17/40] m68k: mac: Don't send IOP message until channel is idle Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 18/40] m68k: mac: Fix IOP status/control register writes Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 19/40] platform/x86: intel-hid: Fix return value check in check_acpi_dev() Sasha Levin
2020-08-08 23:38 ` Sasha Levin [this message]
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 21/40] ARM: dts: gose: Fix ports node name for adv7180 Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 22/40] ARM: dts: gose: Fix ports node name for adv7612 Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 23/40] ARM: at91: pm: add missing put_device() call in at91_pm_sram_init() Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 24/40] ARM: dts: sunxi: bananapi-m2-plus-v1.2: Add regulator supply to all CPU cores Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 25/40] ARM: dts: sunxi: bananapi-m2-plus-v1.2: Fix CPU supply voltages Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 26/40] spi: lantiq: fix: Rx overflow error in full duplex mode Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 27/40] tpm: Require that all digests are present in TCG_PCR_EVENT2 structures Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 28/40] recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64 Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 29/40] regulator: fix memory leak on error path of regulator_register() Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 30/40] io_uring: fix sq array offset calculation Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 31/40] spi: rockchip: Fix error in SPI slave pio read Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 32/40] ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh() Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 33/40] iocost: Fix check condition of iocg abs_vdebt Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 34/40] irqchip/ti-sci-inta: Fix return value about devm_ioremap_resource() Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 35/40] seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 36/40] md: raid0/linear: fix dereference before null check on pointer mddev Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 37/40] nvme-tcp: fix controller reset hang during traffic Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 38/40] nvme-rdma: " Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 39/40] nvme-multipath: fix logic for non-optimized paths Sasha Levin
2020-08-08 23:38 ` [PATCH AUTOSEL 5.4 40/40] nvme-multipath: do not fall back to __nvme_find_path() " Sasha Levin
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=20200808233844.3618823-20-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hulkci@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luwei32@huawei.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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