From: Chanwoo Choi <cw00.choi@samsung.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>, Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] usb: phy: omap-otg: do not write to unallocated memory
Date: Fri, 20 Nov 2015 15:02:38 +0900 [thread overview]
Message-ID: <564EB77E.3040000@samsung.com> (raw)
In-Reply-To: <1447976581-12666-1-git-send-email-xypron.glpk@gmx.de>
Hi,
The same patch was already reviewed and applied on usb.git repository[1]
[1] https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?h=testing/fixes&id=2c2025b41aeff57963f9ae2dd909fea704c625ab
Thanks,
Chanwoo Choi
On 2015년 11월 20일 08:43, Heinrich Schuchardt wrote:
> The current coding writes to memory before allocating it.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> drivers/usb/phy/phy-omap-otg.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/phy/phy-omap-otg.c b/drivers/usb/phy/phy-omap-otg.c
> index 1270906..8bbf121 100644
> --- a/drivers/usb/phy/phy-omap-otg.c
> +++ b/drivers/usb/phy/phy-omap-otg.c
> @@ -105,12 +105,13 @@ static int omap_otg_probe(struct platform_device *pdev)
> extcon = extcon_get_extcon_dev(config->extcon);
> if (!extcon)
> return -EPROBE_DEFER;
> - otg_dev->extcon = extcon;
>
> otg_dev = devm_kzalloc(&pdev->dev, sizeof(*otg_dev), GFP_KERNEL);
> if (!otg_dev)
> return -ENOMEM;
>
> + otg_dev->extcon = extcon;
> +
> otg_dev->base = devm_ioremap_resource(&pdev->dev, &pdev->resource[0]);
> if (IS_ERR(otg_dev->base))
> return PTR_ERR(otg_dev->base);
>
prev parent reply other threads:[~2015-11-20 6:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 23:43 [PATCH 1/1] usb: phy: omap-otg: do not write to unallocated memory Heinrich Schuchardt
2015-11-20 6:02 ` Chanwoo Choi [this message]
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=564EB77E.3040000@samsung.com \
--to=cw00.choi@samsung.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=xypron.glpk@gmx.de \
/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