Re: [PATCH] ACPI : dock: add error handling for acpi_bus_get_device

From: Rafael J. Wysocki
Date: Thu Jun 14 2018 - 03:54:49 EST

On Tue, Jun 12, 2018 at 6:38 AM, Zhouyang Jia <jiazhouyang09@xxxxxxxxx> wrote:
> When acpi_bus_get_device fails, the lack of error-handling code may
> cause unexpected results.

It is perfectly predictable in this particular case: adev will be NULL
and acpi_device_enumerated(adev) will return false.

> This patch adds error-handling code after calling acpi_bus_get_device.

Which is not necessary.