mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-27 20:42:52 +00:00
[ Upstream commitc91a5b1c22] The function device_create_file() in huawei_wmi_battery_add() can fail, so its return value should be checked. Fixes:355a070b09("platform/x86: huawei-wmi: Add battery charging thresholds") Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Link: https://lore.kernel.org/r/20220303022421.313-1-baijiaju1990@gmail.com 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>