Unverified Commit 48276059 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3404 Add the verification operation after the bus recovery operation obtains...

!3404 Add the verification operation after the  bus recovery operation obtains resources through the ACPI

Merge Pull Request from: @lujunhuaHW 
 
If the device does not support obtaining resources through ACPI, the
obtained adev pointer may be null. After obtaining resources through
ACPI, add whether to support ACPI and null pointer check. 
 
Link:https://gitee.com/openeuler/kernel/pulls/3404

 

Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 50ded6f3 d4fdfda1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -498,7 +498,10 @@ static void hisi_i2c_init_recovery_info(struct hisi_i2c_controller *ctlr)
	struct acpi_device *adev = ACPI_COMPANION(ctlr->dev);
	struct gpio_desc *gpio;

	if (!acpi_has_method(adev->handle, HISI_I2C_PIN_MUX_METHOD))
	if (acpi_disabled)
		return;

	if (!adev || !acpi_has_method(adev->handle, HISI_I2C_PIN_MUX_METHOD))
		return;

	gpio = devm_gpiod_get_optional(ctlr->dev, "scl", GPIOD_OUT_HIGH);