Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2627946pxk; Mon, 14 Sep 2020 20:09:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQpB5FEX1M0BlnTd13V0DCumCNf4Oby/eyQ2UaVZvhxIE+YfL8MpoWaTuUjCaU1DFGRGgL X-Received: by 2002:aa7:da09:: with SMTP id r9mr20541317eds.7.1600139348198; Mon, 14 Sep 2020 20:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600139348; cv=none; d=google.com; s=arc-20160816; b=SDlw1NoOfd5F0H9vcInaobn4jEZnGK0c1YVXuQ6x7nCI/Re4PdBGf9F+/akzOFcBMb EzdEi6TCCofycE6Y5G0GeW4Iug5rs1iBKuG4snKid94RItIdgKYZnUeadpTzn49eKQVw 5TM2Rwtb4CJU4TRSF9/vWsSizo5plWBXd4SKHSmNY/b55vkPDlng18p6szOon/aLe8SE GxEff1trBU7YTlyEebDPIDuwAjd4P+x2DUlMHDY1hwZWiXHh8DuSS97xU8QWDk+sUGJb 2Oxexf2zT/3fJJHR/J8yVDstQIyMlVVJibiUbmnl/T+ifYt6+ye4jEPpd1VV0MwYPCeJ ie+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=i3HiQcRKrhCZmSo6xL+hdx/UAnriR84FJ6E+6r+ECgs=; b=N5OQpEPGo7USyr3BS9zwga9qdWsPWmwzGTdJrIMh21F7+lkiy8IXkEmFjp/tWFQ1jP NXjh/xTzX/Zm5lyidQGok+FkHxI4npFBMns9NvbOuTdgZ2beOHWO1EHqwgPoRZ+PwyvL W6dQTkAW5HWPNmpdPNfG3H4r0mt77WKPm4G3lH4EBdPctuvGEByESJspoEV47woPI/OG DiKXgDbTMduyKJJT14jKi/pBKYAokpsUYwWFOBepvarqqX3rWsCFyiHyaMiVwUlCT08W 8RjObR2kp7CjZ9sSQWIO/E+kCFkFDEcuAC66dPA+XT8Cr19g7STvZEaWU/5Cl1HzTBhB 258Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e23si10049247ejl.643.2020.09.14.20.08.46; Mon, 14 Sep 2020 20:09:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726245AbgIODFD (ORCPT + 99 others); Mon, 14 Sep 2020 23:05:03 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:41576 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726117AbgIODEy (ORCPT ); Mon, 14 Sep 2020 23:04:54 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 47EA6E680264F1FB98B4; Tue, 15 Sep 2020 11:04:52 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Tue, 15 Sep 2020 11:04:42 +0800 From: Wei Xu To: CC: , , , , , , , , , , , , John Stultz , Arnd Bergmann , Greg Kroah-Hartman , Subject: [PATCH] misc: hisi_hikey_usb: fix the uninitialized ret Date: Tue, 15 Sep 2020 11:01:01 +0800 Message-ID: <1600138861-187291-1-git-send-email-xuwei5@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The uninitialized ret in hisi_hikey_usb_parse_kirin970 is useless. Simply remove it and return 0 on success to fix the issue reported by Coverity Scan. Fixes: d210a0023590 ("misc: hisi_hikey_usb: add support for Hikey 970") Signed-off-by: Wei Xu --- drivers/misc/hisi_hikey_usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/hisi_hikey_usb.c b/drivers/misc/hisi_hikey_usb.c index 2ddd4072788d..5759e7209023 100644 --- a/drivers/misc/hisi_hikey_usb.c +++ b/drivers/misc/hisi_hikey_usb.c @@ -151,7 +151,6 @@ static int hisi_hikey_usb_parse_kirin970(struct platform_device *pdev, struct hisi_hikey_usb *hisi_hikey_usb) { struct regulator *regulator; - int ret; regulator = devm_regulator_get(&pdev->dev, "hub-vdd"); if (IS_ERR(regulator)) { @@ -172,7 +171,7 @@ static int hisi_hikey_usb_parse_kirin970(struct platform_device *pdev, if (IS_ERR(hisi_hikey_usb->reset)) return PTR_ERR(hisi_hikey_usb->reset); - return ret; + return 0; } static int hisi_hikey_usb_probe(struct platform_device *pdev) -- 2.8.1