Bug in pcmcia_resource.c

Michael Buesch mb at bu3sch.de
Sat Jun 14 16:18:26 EDT 2008


On Saturday 14 June 2008 19:06:08 Dominik Brodowski wrote:
> Hi,
> 
> thanks for noting this issue. Could you ACK this patch, please?
> 
> Thanks,
> 	Dominik
> 
> From: Dominik Brodowski <linux at dominikbrodowski.net>
> Subject: [PATCH 1/1] [PATCH] pcmcia: check for pointer instead of pointer address
> 
> Bug noted by Michael Buesch: checking for the pointer address is always true.
> This didn't matter much, for the very first check in pcmcia_release_window()
> was for the pointer pointing to something, and the return value is ignored
> here. Nonetheless, fix it.
> 
> CC: Michael Buesch <mb at bu3sch.de>
> Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>

Acked-by: Michael Buesch <mb at bu3sch.de>

> ---
>  drivers/pcmcia/pcmcia_resource.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
> index 1d128fb..c8f77b8 100644
> --- a/drivers/pcmcia/pcmcia_resource.c
> +++ b/drivers/pcmcia/pcmcia_resource.c
> @@ -966,7 +966,7 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) {
>  	pcmcia_release_configuration(p_dev);
>  	pcmcia_release_io(p_dev, &p_dev->io);
>  	pcmcia_release_irq(p_dev, &p_dev->irq);
> -	if (&p_dev->win)
> +	if (p_dev->win)
>  		pcmcia_release_window(p_dev->win);
>  }
>  EXPORT_SYMBOL(pcmcia_disable_device);



-- 
Greetings Michael.



More information about the linux-pcmcia mailing list