From: Dan Carpenter Date: Mon, 28 Nov 2011 13:53:13 +0000 (+0300) Subject: mtd: docg3: dereferencing an ERR_PTR() in docg3_probe() X-Git-Tag: v3.3-rc1~119^2~89 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b49e345e61a2e0c4decbe9b1bd670ed5599fac6e;p=pandora-kernel.git mtd: docg3: dereferencing an ERR_PTR() in docg3_probe() If doc_probe_device() returned an ERR_PTR, then we accidentally saved that to docg3_floors[floor] = mtd; which gets derefenced in the error handling when we call doc_release_device(). I've reworked the error handling to take care of that and hopefully make it a little simpler. Signed-off-by: Dan Carpenter Acked-by: Robert Jarzmik Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed