coresight: Drop double check for ACPI companion device
PATCH 1/1 coresight: Drop double check for ACPI companion device
acpi_dev_get_resources() does perform the NULL pointer check against ACPI companion device which is given as function parameter. Thus, there is no need to duplicate this check in the caller.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/hwtracing/coresight/coresight-stm.c | 2 -- 1 file changed, 2 deletions(-)
drivers/hwtracing/coresight/coresight-stm.c +0 -2
@@ -727,8 +727,6 @@ static int acpi_stm_get_stimulus_area(struct device *dev, struct resource *res)struct acpi_device *adev =ACPI_COMPANION (dev); -if (!adev) -return -ENODEV ; rc =acpi_dev_get_resources (adev, &res_list,NULL ,NULL );if (rc <0 )return rc;
Signature · 1 line
2.26.2
Hi Andy,
Quoted 14 lines · Andy Shevchenko
acpi_dev_get_resources()does perform the NULL pointer check against ACPI companion device which is given as function parameter. Thus, there is no need to duplicate this check in the caller.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/hwtracing/coresight/coresight-stm.c | 2 -- 1 file changed, 2 deletions(-)drivers/hwtracing/coresight/coresight-stm.c +0
-0
drivers/hwtracing/coresight/coresight-stm.c static int acpi_stm_get_stimulus_area(struct device *dev, struct resource *res) · line 732
Quoted 8 lines
drivers/hwtracing/coresight/coresight-stm.c +0
-2@@ -727,8 +727,6 @@ static int acpi_stm_get_stimulus_area(struct device *dev, struct resource *res)struct acpi_device *adev =ACPI_COMPANION (dev); -if (!adev) -return -ENODEV ; rc =acpi_dev_get_resources (adev, &res_list,NULL ,NULL );if (rc <0 )return rc;
I have applied your patch.
Thanks,
Mathieu
Quoted 3 lines
Signature · 1 line
2.26.2