Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1887282pxb; Fri, 5 Mar 2021 02:01:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGCG+a9cXBjwxy2jQlfwtlVxJtmsmgsdd/OCkTa47AC8VdON0rwb3LZ+kxvr6VOOpo7iez X-Received: by 2002:a50:fe08:: with SMTP id f8mr8340599edt.217.1614938516294; Fri, 05 Mar 2021 02:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614938516; cv=none; d=google.com; s=arc-20160816; b=NBzUDwcWit+kEU88yjJAw1ekbk/Ufj8ctS63767bsO42SbaZauaWFEf3XECg9n/Mfg C9iVMePxHTAOvAOYbkvCuy0p6DmHhZ0mvbN5NTeCE1xrFFmzhxxAduzH23frBYkk95eM GagEXdsgddw5bHrTcE7lTeJHnIRtXgTGMfQ8Md3ANtvqi6OfJ2pBk3eKnHapXSj4QCcz N1WEK/VR9k//rBE0ZVJufNdn7gz+LhQfge/I9dYzO/o32p6AAdBRKATX5WtHvyuuUYHA MjV2d72OHSxbRUIdwHfv2Y/sw4rqbEWBu0xRkIBVXeU97DkMvaSIpahXYTaE9eDGvl1N UpSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=INlAlYygcCr8qFIw5Y+aGmBMuUbzyX/B9XRXD/oolTA=; b=Q6Mxzuxjnw8QDNuij060C6t0c4tuhoyuPBXJBvDLnwLVo12OyaxFePDzWxWxLeMPaN 0vygp/CqbDyWmGgaAVU3j5vKAjKmNZyf16RY2AoY7BPXTPYPQwDn8PZLkSL1jpg2BK89 rwkGeyhfFciNcAXTdWKT8SdRQiZeGBel9nAkf+15W+cI9OMrsvQyEqtaclLa8SJ2tKgQ y4B4XodMY0OxZvPCvIrabucp4wVRhcAlKI2fWZ867GoeEOe5mT4ttc+O5kkhMhv6Qidn BQ06wIuH/LzrGpk2TwU182dWz0OCXro2/9K0T86ZTF8xTwYh3xL/lZqvxZq5CQFCkcIc VEdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IdODdt96; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si667907ejc.1.2021.03.05.02.01.33; Fri, 05 Mar 2021 02:01:56 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IdODdt96; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229674AbhCEJ6b (ORCPT + 99 others); Fri, 5 Mar 2021 04:58:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbhCEJ6Q (ORCPT ); Fri, 5 Mar 2021 04:58:16 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71556C061574; Fri, 5 Mar 2021 01:58:16 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id j12so1627819pfj.12; Fri, 05 Mar 2021 01:58:16 -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=INlAlYygcCr8qFIw5Y+aGmBMuUbzyX/B9XRXD/oolTA=; b=IdODdt96RTZyyooVjpTz93+P0LMMsTXlm0eZU9AuBwtMERFZ2xtpzVHsMCLFFQqIAV 8DqDEWPUoEoBw5EbbCEeFGlWpoyiphtM259DTpauGd9tJATvPI2qj+7T6lUIOznK+665 8jUJ0V1iQ4vCMYkuZzMzZGRCdMDu1xXn6Ub8PluxF3HTQ1wGnCBWzNWKH+USmcjn975U ZpLutmb1hk6kI/gJM/1iGZPQNmgu9vXtSNUSU4h+icbJzxaEKy83KMDr9/nWfUyA8tk6 YeG8v2FM+YJc3d7qjf7GC5Uf9J/QBTBNWMamiAZB1V/JKtwv9ZLHkboo5a6UrZXLkdY1 t9WQ== 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=INlAlYygcCr8qFIw5Y+aGmBMuUbzyX/B9XRXD/oolTA=; b=nHSb5ej0TgVYSRQ0OXXwAPuLe7ntQTt9sJO6litbRb3X8iEDVk/o+6Rg85W8HfulyY RnPs5n9hT8ErsSdcnxK9PUvziDlzYHuuJt4bgfDxxQAq9W8JdBLxBS3jMR9vmPbqwEye KzbPxkWWkN4k81bL3xUErGfB7MzafZ4RX+kCoMMioHMrmMxwbTEKSqVRk3nhZ5FGmsZZ SuT73OgIzoliotIkKuMeqxNrP8gV9F/OB+vnlrDizmUfq5UyRJ0P0FInEdT3XKlRYZ5X 2FEDDktyU6Wl48mvmDrEbwhRUVhOJwO2HgXRMCiVlRusMQVzebh+Y003ro3FmHQb7wiq Cckg== X-Gm-Message-State: AOAM5331E0aaA1CYuVIlTDQlUdL6fNwfUep5DRxhiODw9RUzgEQPO2cx 5/99qEKtEeo9fefIfsHAYK8= X-Received: by 2002:a63:5c23:: with SMTP id q35mr7926120pgb.418.1614938296114; Fri, 05 Mar 2021 01:58:16 -0800 (PST) Received: from localhost.localdomain ([45.135.186.129]) by smtp.gmail.com with ESMTPSA id c193sm2193231pfc.180.2021.03.05.01.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 01:58:15 -0800 (PST) From: Jia-Ju Bai To: alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, cang@codeaurora.org, beanhuo@micron.com, jaegeuk@kernel.org, asutoshd@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] scsi: ufs: fix error return code of ufshcd_devfreq_target() Date: Fri, 5 Mar 2021 01:58:08 -0800 Message-Id: <20210305095808.14119-1-baijiaju1990@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the list of clk_list is empty, no error return code of ufshcd_devfreq_target() is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 77161750c9fb..d31aae56fd96 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1337,6 +1337,7 @@ static int ufshcd_devfreq_target(struct device *dev, if (list_empty(clk_list)) { spin_unlock_irqrestore(hba->host->host_lock, irq_flags); + ret = -ENOENT; goto out; } -- 2.17.1