From: Kishon Vijay Abraham I <kishon@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Tomasz Figa <t.figa@samsung.com>, Felipe Balbi <balbi@ti.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [patch] drivers: phy: tweaks to phy_create()
Date: Wed, 06 Nov 2013 08:23:26 +0000 [thread overview]
Message-ID: <5279F9AE.303@ti.com> (raw)
In-Reply-To: <20131106075412.GB13475@elgon.mountain>
Hi,
On Wednesday 06 November 2013 01:24 PM, Dan Carpenter wrote:
> If this was called with a NULL "dev" then it lead to a NULL dereference
> when we called dev_WARN(). I have changed it to WARN_ON() so that we
> get a stack dump and can fix the caller.
>
> If ida_simple_get() failed then there was a missing call to kfree(phy).
There was already a patch fixing it.
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git fixes
>
> The rest of this patch is just cleanup like returning directly instead
> of having do-nothing gotos. Using descriptive labels instead of
Grouping the err returns in the end looked a bit cleaner to me. It's
just a matter of preference I guess.
> GW-BASIC style "err0" and "err1". I also flipped the order of
> put_device() and ida_remove() so they are a mirror reflection of the
> order they were allocated.
>
Thanks
Kishon
WARNING: multiple messages have this Message-ID (diff)
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
Tomasz Figa <t.figa@samsung.com>, Felipe Balbi <balbi@ti.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [patch] drivers: phy: tweaks to phy_create()
Date: Wed, 6 Nov 2013 13:41:26 +0530 [thread overview]
Message-ID: <5279F9AE.303@ti.com> (raw)
In-Reply-To: <20131106075412.GB13475@elgon.mountain>
Hi,
On Wednesday 06 November 2013 01:24 PM, Dan Carpenter wrote:
> If this was called with a NULL "dev" then it lead to a NULL dereference
> when we called dev_WARN(). I have changed it to WARN_ON() so that we
> get a stack dump and can fix the caller.
>
> If ida_simple_get() failed then there was a missing call to kfree(phy).
There was already a patch fixing it.
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git fixes
>
> The rest of this patch is just cleanup like returning directly instead
> of having do-nothing gotos. Using descriptive labels instead of
Grouping the err returns in the end looked a bit cleaner to me. It's
just a matter of preference I guess.
> GW-BASIC style "err0" and "err1". I also flipped the order of
> put_device() and ida_remove() so they are a mirror reflection of the
> order they were allocated.
>
Thanks
Kishon
next prev parent reply other threads:[~2013-11-06 8:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 7:54 [patch] drivers: phy: tweaks to phy_create() Dan Carpenter
2013-11-06 7:54 ` Dan Carpenter
2013-11-06 8:11 ` Kishon Vijay Abraham I [this message]
2013-11-06 8:23 ` Kishon Vijay Abraham I
2013-11-06 9:30 ` Dan Carpenter
2013-11-06 9:30 ` Dan Carpenter
2013-11-11 14:37 ` Kishon Vijay Abraham I
2013-11-11 14:49 ` Kishon Vijay Abraham I
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=5279F9AE.303@ti.com \
--to=kishon@ti.com \
--cc=balbi@ti.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=t.figa@samsung.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.