From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [patch v2] mtd/docg3: dereferencing an ERR_PTR() in docg3_probe()
Date: Tue, 29 Nov 2011 22:00:09 +0000 [thread overview]
Message-ID: <874nxm8u8m.fsf@free.fr> (raw)
In-Reply-To: <20111128134947.GK21128@mwanda> (Dan Carpenter's message of "Mon, 28 Nov 2011 16:53:13 +0300")
Dan Carpenter <dan.carpenter@oracle.com> writes:
> 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 <dan.carpenter@oracle.com>
> ---
> v2: Version 1 conflicted with another patch in stream.
Ok, applied and tested locally (even if that branch of code obviously is not
triggered in my case), and everything should work even better with it.
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
next prev parent reply other threads:[~2011-11-29 22:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 7:21 [patch] mtd/docg3: fix error handling in docg3_probe() Dan Carpenter
2011-11-24 9:02 ` walter harms
2011-11-24 9:31 ` Dan Carpenter
2011-11-24 10:17 ` Robert Jarzmik
2011-11-24 10:31 ` Dan Carpenter
2011-11-26 10:58 ` Robert Jarzmik
2011-11-28 13:53 ` [patch v2] mtd/docg3: dereferencing an ERR_PTR() " Dan Carpenter
2011-11-29 22:00 ` Robert Jarzmik [this message]
2011-12-01 8:02 ` [patch v2] mtd/docg3: dereferencing an ERR_PTR() in Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874nxm8u8m.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=dan.carpenter@oracle.com \
--cc=dwmw2@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).