Re: [PATCH 2/2] ACPI / LPSS: make code less confusing for reader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, March 20, 2013 02:14:30 PM Andy Shevchenko wrote:
> The excerpt like this:
> 
> 	if (err) {
> 		err = 0;
> 		goto error_out;
> 	}
> 
> makes a reader confused even if it's commented. Let's do necessary actions and
> return no error explicitly.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Applied to linux-pm.git/linux-next.

Thanks,
Rafael


> ---
>  drivers/acpi/acpi_lpss.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index c695841..5d7ded2 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -152,8 +152,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
>  			 * Skip the device, but don't terminate the namespace
>  			 * scan.
>  			 */
> -			ret = 0;
> -			goto err_out;
> +			kfree(pdata);
> +			return 0;
>  		}
>  	}
>  
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux