Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161101AbbKTGCt (ORCPT ); Fri, 20 Nov 2015 01:02:49 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:48648 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759005AbbKTGCm convert rfc822-to-8bit (ORCPT ); Fri, 20 Nov 2015 01:02:42 -0500 X-AuditID: cbfee691-f79bf6d000006c90-95-564eb77e1c99 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8BIT Message-id: <564EB77E.3040000@samsung.com> Date: Fri, 20 Nov 2015 15:02:38 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Heinrich Schuchardt , Felipe Balbi Cc: Greg Kroah-Hartman , 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 References: <1447976581-12666-1-git-send-email-xypron.glpk@gmx.de> In-reply-to: <1447976581-12666-1-git-send-email-xypron.glpk@gmx.de> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDIsWRmVeSWpSXmKPExsWyRsSkWLd+u1+Ywe2ZzBYH79dbNC9ez2Zx edccNovZS/pZLBYta2W2ODz1A6MDm8eHj3Ee++euYfc4fmM7k8fnTXIBLFFcNimpOZllqUX6 dglcGc3npzEX/OKseP/8L2MD40aOLkZODgkBE4np83tYIWwxiQv31rOB2EICKxglFvfIwNS8 nf6DsYuRCyi+lFGie+5+FpAEr4CgxI/J98BsZgF1iUnzFjF3MXIA2SIS6w8UQoS1JZYtfM0M 0fuAUeL81k4miF4tif9/bjGC1LMIqEq0vwwHCbMBhfe/uMEGEhYViJDoPlEJEhYR8JTov3uE DWQMs0AXo8SD3qOMIAlhAX+J/eueMkLc7CSxdXUXM4jNKeAs0fG7iQWkQUJgH7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h9iNAV6byKzlGhyPjCx5JXEGxqbmBlZ GpkbWhgZmyuJ8+p7GoUJCaQnlqRmp6YWpBbB9DFxcEo1MArU9/yxrzYVFerKDrwr3+BvPdO+ Z6rnMQ4e/0PrezrZt3otFV9ew/E4JrdE0kz097Er381XPwo7X7LnhuyJjwxfLu9SFTl57Pxe LZs9eUZB896eSbb+unnXzt7Tyrl3uV/0GIopW31hcfxsHaL/vCV9/qowW66Q/xvzH313kD+w 6+yB+t67+5VYijMSDbWYi4oTAdtVPl/0AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1448 Lines: 42 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 > --- > 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); > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/