lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100226162002.GE23453@holoscopio.com>
Date:	Fri, 26 Feb 2010 13:20:03 -0300
From:	Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
To:	Bruno Prémont <bonbons@...ux-vserver.org>
Cc:	Daniel Oliveira Nascimento <don@...t.com.br>,
	Richard Purdie <rpurdie@...ux.intel.com>,
	linux-kernel@...r.kernel.org, mjg@...hat.com
Subject: Re: [PATCH] backlight, classmate-laptop: fix missing registration
 failure handling

Mathew,

Please apply the following patch.

Acked-by: Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>

On Fri, Feb 26, 2010 at 12:59:39PM +0100, Bruno Prémont wrote:
> Check newly registered backlight_device for error and properly
> return error to parent.
> Mark struct backlight_ops as const.
> 
> Signed-off-by: Bruno Prémont <bonbons@...ux-vserver.org>
> ---
>  drivers/platform/x86/classmate-laptop.c |    2 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
> index bfae789..66f6aad 100644
> --- a/drivers/platform/x86/classmate-laptop.c
> +++ b/drivers/platform/x86/classmate-laptop.c
> @@ -452,7 +452,7 @@ static int cmpc_bl_update_status(struct backlight_device *bd)
>  		return -1;
>  }
>  
> -static struct backlight_ops cmpc_bl_ops = {
> +static const struct backlight_ops cmpc_bl_ops = {
>  	.get_brightness = cmpc_bl_get_brightness,
>  	.update_status = cmpc_bl_update_status
>  };
> @@ -463,6 +463,8 @@ static int cmpc_bl_add(struct acpi_device *acpi)
>  
>  	bd = backlight_device_register("cmpc_bl", &acpi->dev,
>  				       acpi->handle, &cmpc_bl_ops);
> +	if (IS_ERR(bd))
> +		return PTR_ERR(bd);
>  	bd->props.max_brightness = 7;
>  	dev_set_drvdata(&acpi->dev, bd);
>  	return 0;
> -- 
> 1.6.4.4
> 

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ