public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: mjg59@srcf.ucam.org, dvhart@infradead.org, andy@infradead.org,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] platform/x86: dell-laptop: Handle return error form dell_get_intensity.
Date: Tue, 14 Mar 2017 10:28:46 +0100	[thread overview]
Message-ID: <20170314092846.GB7422@pali> (raw)
In-Reply-To: <1489038596-3765-1-git-send-email-arvind.yadav.cs@gmail.com>

On Thursday 09 March 2017 11:19:56 Arvind Yadav wrote:
> Here, This patch is to handle a return error from dell_get_intensity.
> This change is done using Coccinelle.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Ok, seems good. You can add my Acked-By.

> ---
>  drivers/platform/x86/dell-laptop.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
> index f57dd28..7fcf680 100644
> --- a/drivers/platform/x86/dell-laptop.c
> +++ b/drivers/platform/x86/dell-laptop.c
> @@ -2053,11 +2053,17 @@ static int __init dell_init(void)
>  
>  		dell_backlight_device->props.brightness =
>  			dell_get_intensity(dell_backlight_device);
> +		if (dell_backlight_device->props.brightness < 0) {
> +			ret = dell_backlight_device->props.brightness;
> +			goto fail_get_brightness;
> +		}
>  		backlight_update_status(dell_backlight_device);
>  	}
>  
>  	return 0;
>  
> +fail_get_brightness:
> +	backlight_device_unregister(dell_backlight_device);
>  fail_backlight:
>  	dell_cleanup_rfkill();
>  fail_rfkill:

-- 
Pali Rohár
pali.rohar@gmail.com

      reply	other threads:[~2017-03-14  9:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09  5:49 [PATCH v2] platform/x86: dell-laptop: Handle return error form dell_get_intensity Arvind Yadav
2017-03-14  9:28 ` Pali Rohár [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170314092846.GB7422@pali \
    --to=pali.rohar@gmail.com \
    --cc=andy@infradead.org \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox