power: supply: bq2415x: check for NULL acpi_id to avoid null pointer dereference
acpi_match_device can potentially return NULL, so it is prudent to check if acpi_id is null before it is dereferenced. Add a check and an error message to indicate the failure. Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
Showing
想要评论请 注册 或 登录