Message ID | 20190610084213.1052-8-lee.jones@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp758618ilk; Mon, 10 Jun 2019 01:42:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbl1DG9BeqphIk+G22iatozm97dCTPAgNz4aWSFmogG3upiPZ6vgNIZTt4CQ99KfSEIn8+ X-Received: by 2002:a63:3c9:: with SMTP id 192mr9215935pgd.90.1560156149913; Mon, 10 Jun 2019 01:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560156149; cv=none; d=google.com; s=arc-20160816; b=c0GOgA39ePhpU1rQbb5Rm+0JzJbIKM9WhSZmaoJ3eILOcT4DxQybOo/rciZfzdo7Jn P1JfJGI+Euc29MFa8KRS6O9q681j3MQBgLr7Q4i2EXM17xErYoJpPUq66DU/uIp7M2v+ sRFehTcrqUPZNb32Y4R9onXxGIArf3FUUYCPfBCED4dso5sE6sk+inZDgYgS7P6wjeYy JuQTvZV1sgsOZvPViwOVQHYpleSX8cYfCw16K/cO0zbAxRP5ABmVLiHWed2vWhY+BKeQ gxjEHBQ/IeZOMadsE/HxdzabLkh81U5HTv+f/7d/iwJZruxiE78B+M32tRoOIrAyifT2 S2Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=FalRLEADzMPtGyW8NIPAA0F5olxzxXGnPVoGFb+myak=; b=dZDEYMN78cOx9gO5MDKh3t/UyuHqptnK7ptvs3ws3CobgrZuwBLLCtfVB7/fPFfsIm z74IqAir/dtRvDFMLgpWI6oP/F0OIvnALaB8xzS0/66TL8p9DggzqQw/+ehKp3nYxXB7 P/e8mHUoBYMEsncyh0Ry8JxLqHNR2kBZppJ9GByi2md9oc2c9dIUpmeupgR7/RIEHdnS AsmXIQBWRXPKIJN1kwIloYuQwzuaX+w2bQ7fQ1MRHZGvyHaK1SSRaGOKy9SP/mPHJNM8 LPN2+QSRIDPAXdpn24m/gJXRzF6XkQ0TrWWiHUNuuWxqw6t9zckDD1JSmKY7MgBeer2H 2Qcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ErpuCgIK; 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=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj19si9882295plb.169.2019.06.10.01.42.29; Mon, 10 Jun 2019 01:42:29 -0700 (PDT) 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=@linaro.org header.s=google header.b=ErpuCgIK; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388606AbfFJIm2 (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 10 Jun 2019 04:42:28 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40116 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388430AbfFJImZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 10 Jun 2019 04:42:25 -0400 Received: by mail-wm1-f65.google.com with SMTP id v19so7280444wmj.5 for <linux-kernel@vger.kernel.org>; Mon, 10 Jun 2019 01:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FalRLEADzMPtGyW8NIPAA0F5olxzxXGnPVoGFb+myak=; b=ErpuCgIKx7tdIhXc0Vgq27YYh5IdzYS8ZROzqkhZo992Lvnn19vfhbIqZzxfQ10161 q/yb5S3UOlu7jVewR6gPOHtopPzH2mIm47P8H5DIDXJkkAvu/fVLeYL+XDHodIfbmI/Q CKa9e4AABXjZuSQiUwSxAL/oBnskNHq1jEInWN4Q5Tp+sQdhRKsiH2TxkMt482GTBNR7 aY1rlYW3/QXDuFLndlbV2tpu9/XuFDuowc7j5gTlPoBAZBoUbY32p3JHHxZM6+39iUMi I88QsPzhpoQOgqfRr4ELN1VJv09S0GcBFZHzKYKYqObfTb0uzFEHbnk2tmqKPOZqSUBm gHPQ== 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:in-reply-to :references; bh=FalRLEADzMPtGyW8NIPAA0F5olxzxXGnPVoGFb+myak=; b=Ex6dGnHx1kiXkPhSYzjDklpUJYmlB8QBbofxqYVN7O/n5KAsNIKzNtTfXQgeNkCoFk 5UTrQER+6tOgWrXBqKGKWoTpV/JmuDVGn2g2JJNzcBpAAco93oJCS8gUgwyeu8d/2KEB UCe1Hx8Wt2/y6429le1tQtTXy89WLbQWYtMtp0USXY0xtmwzA4u7dUFrLrcjdE2GqnLm ZqmVSIRkJXyOrAFi7C5uxXfp2a46nFC5gpJrJHstFFz/FazPcCJj2sdH5J/cI/AmwFnq kI/Y+Af12F1Qpu3C8/CRrVPAkqSUYw3qNGopJWOx2UCHKcyU98mYXFNhQhL2X5z6+caU 2sGg== X-Gm-Message-State: APjAAAVV9J9p7KsXZXQb+50A877uItfZQJOw6IwdDX1nT5r8Tjdbv7+d aUo6td+wGMJtUymUYnvYMylB3g== X-Received: by 2002:a1c:35c9:: with SMTP id c192mr12941297wma.147.1560156143556; Mon, 10 Jun 2019 01:42:23 -0700 (PDT) Received: from localhost.localdomain ([2.31.167.229]) by smtp.gmail.com with ESMTPSA id a125sm9929670wmf.42.2019.06.10.01.42.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 01:42:23 -0700 (PDT) From: Lee Jones <lee.jones@linaro.org> To: alokc@codeaurora.org, andy.gross@linaro.org, david.brown@linaro.org, wsa+renesas@sang-engineering.com, bjorn.andersson@linaro.org, linus.walleij@linaro.org, balbi@kernel.org, gregkh@linuxfoundation.org, ard.biesheuvel@linaro.org, jlhugo@gmail.com, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones <lee.jones@linaro.org> Subject: [PATCH v3 8/8] usb: dwc3: qcom: Improve error handling Date: Mon, 10 Jun 2019 09:42:13 +0100 Message-Id: <20190610084213.1052-8-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190610084213.1052-1-lee.jones@linaro.org> References: <20190610084213.1052-1-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 55ba04254e38..e4dac82abd7d 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -409,6 +409,9 @@ static int dwc3_qcom_clk_init(struct dwc3_qcom *qcom, int count) if (!np || !count) return 0; + if (count < 0) + return count; + qcom->num_clocks = count; qcom->clks = devm_kcalloc(dev, qcom->num_clocks,