mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
platform/x86: wmi: Fix wmi_dev_probe()
This has a reversed if statement so it accidentally disables the wmi
method before returning.
Fixes: 704af3a407 ("platform/x86: wmi: Remove chardev interface")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/9c81251b-bc87-4ca3-bb86-843dc85e5145@moroto.mountain
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
29e473f4b5
commit
8446f9d116
|
|
@ -896,7 +896,7 @@ static int wmi_dev_probe(struct device *dev)
|
|||
if (wdriver->probe) {
|
||||
ret = wdriver->probe(dev_to_wdev(dev),
|
||||
find_guid_context(wblock, wdriver));
|
||||
if (!ret) {
|
||||
if (ret) {
|
||||
if (ACPI_FAILURE(wmi_method_enable(wblock, false)))
|
||||
dev_warn(dev, "Failed to disable device\n");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user