Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932259AbbGGOHP (ORCPT ); Tue, 7 Jul 2015 10:07:15 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:41147 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757532AbbGGOFZ (ORCPT ); Tue, 7 Jul 2015 10:05:25 -0400 X-AuditID: cbfee61b-f79416d0000014c0-50-559bdca372ce From: Robert Baldyga To: gregkh@linuxfoundation.org, balbi@ti.com Cc: nicolas.ferre@atmel.com, vinc94@gmail.com, hamohammed.sa@gmail.com, tapaswenipathak@gmail.com, roberta.dobrescu@gmail.com, hgujulan@visteon.com, chris@rorvick.com, mina86@mina86.com, andrzej.p@samsung.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com, Robert Baldyga Subject: [PATCH 5/5] usb: gadget: atmel_usba_udc: add missing ret value check Date: Tue, 07 Jul 2015 16:02:53 +0200 Message-id: <1436277773-14274-6-git-send-email-r.baldyga@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1436277773-14274-1-git-send-email-r.baldyga@samsung.com> References: <1436277773-14274-1-git-send-email-r.baldyga@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsVy+t9jQd3Fd2aHGmz8omQx62U7i8XB+/UW O+fuY7XYc+YXu0Xz4vVsFnemTWKyeDRzMovFpsfXWC0u75rDZrFoWSuzxdojd9ktFhxvYbX4 drmZ3eLB4Z3sFi0nHrFZ9J3axGyx5v5HJgdBjwW/trJ43Nt3mMVj56y77B77565h99i8pN5j 3Z9XTB67T7N69G1Zxehx/MZ2Jo/Pm+Q8dmy/yB7AHcVlk5Kak1mWWqRvl8CVMWPrddaCJ2wV bQ+mMTUw3mDtYuTkkBAwkTh/8Do7hC0mceHeerYuRi4OIYHpjBItr65DOT8ZJX4d+Q9WxSag I7Hl+wRGEFsEyF73dwdYEbPAdGaJVxumsYAkhAV8JaZ8PQlWxCKgKnFhQw+YzSvgKnF89gdm iHVyEiePTQY7g1PATWLu1NlANRxA21wlVm52nMDIu4CRYRWjaGpBckFxUnqukV5xYm5xaV66 XnJ+7iZGcMA/k97BuKrB4hCjAAejEg/vTYnZoUKsiWXFlbmHGCU4mJVEeN+cBArxpiRWVqUW 5ccXleakFh9ilOZgURLnPZnvEyokkJ5YkpqdmlqQWgSTZeLglGpgzJ4Tws/EFiqz5dR7q1PJ di5ndvDv4dY8c7L81ErH6nvKOkyloSITuQqY73JtvfWjPWVD+nUrv455gbFsLsHXmC82GTKH BWeuDjl/yJclwD6627bQ7YkGf9i+7GdlJX8bdCTS2S18Xm8JuqV9/fvyRR/zeg590moMfF23 ovLB9I8cHesWFJcrsRRnJBpqMRcVJwIA/3NqEHQCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 31 Add missing return value check. In case of error print debug message and return error code. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/atmel_usba_udc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index 4095cce0..37d414e 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.c +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c @@ -1989,6 +1989,10 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev, ep->can_isoc = of_property_read_bool(pp, "atmel,can-isoc"); ret = of_property_read_string(pp, "name", &name); + if (ret) { + dev_err(&pdev->dev, "of_probe: name error(%d)\n", ret); + goto err; + } ep->ep.name = name; ep->ep_regs = udc->regs + USBA_EPT_BASE(i); -- 1.9.1 -- 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/