[PATCH 1/2] drivers/mtd/maps/pcmciamtd.c: fixing obvious errors

Wolfram Sang w.sang at pengutronix.de
Mon Apr 12 21:01:13 EDT 2010


On Mon, Apr 12, 2010 at 07:49:15PM +0400, Alexander Kurz wrote:
> Hello folks,
> this is an attempt, to reanimate the pcmciamtd driver.

Nice :)

> @@ -652,7 +651,6 @@ static int pcmciamtd_config(struct pcmcia_device *link)
>  	link->dev_node = &dev->node;
>  	return 0;
>  
> - failed:
>  	err("CS Error, exiting");
>  	pcmciamtd_release(link);
>  	return -ENODEV;

I'd suggest keeping 'failed', removing the 'err'-statement and using 'goto
failed' in error cases. Currently, pcmciamtd_release() is used many times on
errors.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20100413/5cf8b0e2/attachment.sig>


More information about the linux-mtd mailing list