[patch] mtd/docg3: fix error handling in docg3_probe()

Dan Carpenter dan.carpenter at oracle.com
Thu Nov 24 04:31:20 EST 2011

On Thu, Nov 24, 2011 at 10:02:53AM +0100, walter harms wrote:
> 	the code nicely shows that docg3_floors[floor] will be foobar if mtd==NULL and floor > 0
> 	I guess that can cause problems with the "doc_release_device(docg3_floors[floor]);"
> 	perhaps a "docg3_floors[floor] = NULL;" can help here ?

It's allocated with kzalloc() so it already is.

dan carpenter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20111124/3ca9e539/attachment.sig>

More information about the linux-mtd mailing list