Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12933ea2 authored by Mario Limonciello's avatar Mario Limonciello Committed by Darren Hart (VMware)
Browse files

platform/x86: intel-wmi-thunderbolt: Silence error cases



These were raised by Lukas Wunner as potential DOS attacks against
the system log by passing bad data to sysfs.

Signed-off-by: default avatarMario Limonciello <mario.limonciello@dell.com>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent ae11c5b2
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -41,13 +41,10 @@ static ssize_t force_power_store(struct device *dev,
	if (mode == 0 || mode == 1) {
		status = wmi_evaluate_method(INTEL_WMI_THUNDERBOLT_GUID, 0, 1,
					     &input, NULL);
		if (ACPI_FAILURE(status)) {
			pr_err("intel-wmi-thunderbolt: failed setting %s\n",
			       buf);
		if (ACPI_FAILURE(status))
			return -ENODEV;
		}
	} else {
		pr_err("intel-wmi-thunderbolt: unsupported mode: %d", mode);
		return -EINVAL;
	}
	return count;
}