Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp19529506ybl; Sat, 4 Jan 2020 03:30:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxuNgeu4QlC201q1W0UE6PoqMSQalb3QDJO6BOw9oKbzOTeXqtbWQ8kxckiYNtD5/qtWoOt X-Received: by 2002:a9d:588c:: with SMTP id x12mr100623685otg.2.1578137452383; Sat, 04 Jan 2020 03:30:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578137452; cv=none; d=google.com; s=arc-20160816; b=aqG+33hdygyaxbqnkmHveFeX+BI4trnyA/XbY0dXq90KwOl6cOBdmfY7PPoRCGgYCR VXdosrzRwADNTV4mCnKPkhjUaJqON2n9pw7Q3NBwa+PiyOPVcNmTxdHqGpaL1SrkH6hB KPp5ngrqmVL8rI5VD6emMtVwiRLx0oEqJ8tG9tMuwN0wPG8VrVvXtxOtNmSAvUkzVG0Y S/4Xs+h4MqZ6/y/klYtoT9c3htzOG0UQSr5rwMZCerEpefQb0ugky7QxKAfdyMrPut1O RcYzefmicN420UNxAXPNjTcZCuhzEflNGYUYkaE+RmZr5+Z7r+zB0IMVpJAIM1+SSsG0 f1OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Mskwu76XZBCR2SUd26CGzl4VKCD+hVwmie270qLUwio=; b=SZN1dEzbeKPlyC1VbhWyEPlCBm6OQ/SQ0EA+Nt7nFxY2bxj4WrlepfUPY2djFS2qJg nl8b+HWXffeb8019zWmymR3WTHgQBgzepdTwY/NYdUxqInUAauf+USl4euQoids3ANui IwIynGZpUTidPpk0S0qJSGS++nRAxpoojz+rBeZ4sUo+nAu9kNw+UYwy8JssUwIoPq+y MuiEFj2+ioT8GqM/hkR0t2DpOhXHgtBIMDp7RCsiKArDVFl2MpkoCwcbV+J/X4b9c+s8 XBSnSFrQ0fcmWgBkCc73E/M0XNxmO0mik2M74fbIFps1qfo9+HePO+3cXQJk2aGvhUQx YKGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TAjb8QWY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si648697otr.219.2020.01.04.03.30.29; Sat, 04 Jan 2020 03:30:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TAjb8QWY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725883AbgADL3D (ORCPT + 99 others); Sat, 4 Jan 2020 06:29:03 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:37898 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbgADL3D (ORCPT ); Sat, 4 Jan 2020 06:29:03 -0500 Received: by mail-pj1-f65.google.com with SMTP id l35so5773853pje.3; Sat, 04 Jan 2020 03:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Mskwu76XZBCR2SUd26CGzl4VKCD+hVwmie270qLUwio=; b=TAjb8QWYZANgWxy0IQRbbSlL6exyJvLS2dIr38NJFrtXZFbDhZrI76wHlD+bE3Gskr CshtA3jjzlnBrIRVrgu8+fOSFgvlM6IueHDrPJjVmdk1njIvn2D9KnlIboGFXpP9hL8C bMSXcNkXwWluQH6CzRvoEpvY9jkPsP38Rj0TRsnLNyO9C1rQRkOOfiAF6lkKEtqvbEa4 Kd/85jS6jzVDc6d4pBuYouv+eUZlM+Iyn+OxOhiJIVTqC7eRdGV1etwX7nufra3heY7v /swbosj2h2TyYKhKpmpyV8MV3QBZFouJiKg8zBHC48sBcOfUlMLsSmAFcTvjfevon7ys h3cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Mskwu76XZBCR2SUd26CGzl4VKCD+hVwmie270qLUwio=; b=i8WHuC9T1roxzLSkgbR3dM6YGVZPksypUqf/OFy5jOaZFTHIZIXA4NTKjZoGpF0Z5r fC2ZVRbS4fX22BEhYgjg45xKnp/EV9Ax/9uZJAzpGMLGnORw/zKi0iP5cILBEnyGIJHH BzfltMMf9GJnopwFZMKZjN5rNNEtVZmZlETdZ/uML/OPqQjN21XdYhsc8IdBhZUSo0le Gb3++4B5RQoTpzhiwB+PWmNKIHpfKAaGM39tpm7FLdAAUFa0kJVjwxBj1rAv5Xwj4L9W o8wKg9t0hhC2mlL2KrHJHLl9Ta10pMMPknbqjLPuOS78J7EeDjSqSmkkvG59OlhPIJoE ZoJg== X-Gm-Message-State: APjAAAXP/lHg4hXqWCN5ukFxdPyzuTHRC21qKOPQz3Fim/GPkoQvrYxL 5NGoRzQsEj/pgYb9dPA+iC4= X-Received: by 2002:a17:902:59d8:: with SMTP id d24mr91839751plj.318.1578137342405; Sat, 04 Jan 2020 03:29:02 -0800 (PST) Received: from localhost (199.168.140.36.16clouds.com. [199.168.140.36]) by smtp.gmail.com with ESMTPSA id x4sm71013838pff.143.2020.01.04.03.29.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Jan 2020 03:29:01 -0800 (PST) From: Dejin Zheng To: balbi@kernel.org, gregkh@linuxfoundation.org, stern@rowland.harvard.edu, rogerq@ti.com Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH] usb: gadget: udc: core: Warn about failed to find udc Date: Sat, 4 Jan 2020 19:28:36 +0800 Message-Id: <20200104112836.28036-1-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If we do not warn here, the user may not know failed to find udc class driver because it silently fails. Let's print a warning in that case so developers find these problems faster. Signed-off-by: Dejin Zheng --- drivers/usb/gadget/udc/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index 51fa614b4079..9b11046480fe 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -1414,6 +1414,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver) } mutex_unlock(&udc_lock); + if (ret) + pr_warn("udc-core: couldn't find an available UDC or it's busy\n"); return ret; found: ret = udc_bind_to_driver(udc, driver); -- 2.17.1