summaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-bridge.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2021-11-08 21:03:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-25 11:48:37 +0300
commitb4a677ffb67e3c0319d471ad2d31f206ab470be6 (patch)
tree8bd8cc8dd58a3740e66656d8b2ae9354843f3505 /drivers/fpga/fpga-bridge.c
parent6e6e4fce53fa865db97c84682d7fcbb7d189d5ea (diff)
downloadlinux-b4a677ffb67e3c0319d471ad2d31f206ab470be6.tar.xz
platform/x86: think-lmi: Abort probe on analyze failure
[ Upstream commit 812fcc609502096e98cc3918a4b807722dba8fd9 ] A Lenovo ThinkStation S20 (4157CTO BIOS 60KT41AUS) fails to boot on recent kernels including the think-lmi driver, due to the fact that errors returned by the tlmi_analyze() function are ignored by tlmi_probe(), where tlmi_sysfs_init() is called unconditionally. This results in making use of an array of already freed, non-null pointers and other uninitialized globals, causing all sorts of nasty kobject and memory faults. Make use of the analyze function return value, free a couple leaked allocations, and remove the settings_count field, which is incremented but never consumed. Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Mark Gross <markgross@kernel.org> Reviewed-by: Mark Pearson <markpearson@lenovo.com> Link: https://lore.kernel.org/r/163639463588.1330483.15850167112490200219.stgit@omen Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions