Since dev_err_probe() ignores success, i.e. 0. we may call it unconditionally. Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/platform/x86/intel/int3472/discrete.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c index 34db7d0381fd..29df19379464 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -299,10 +299,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, int3472->ngpios++; ACPI_FREE(obj); - if (ret < 0) - return dev_err_probe(int3472->dev, ret, err_msg); - - return ret; + return dev_err_probe(int3472->dev, ret, err_msg); } static int skl_int3472_parse_crs(struct int3472_discrete_device *int3472) -- 2.43.0.rc1.1336.g36b5255a03ac