From patchwork Wed Sep 28 14:49:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9354019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FAC560756 for ; Wed, 28 Sep 2016 14:50:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5074E29652 for ; Wed, 28 Sep 2016 14:50:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44D0529654; Wed, 28 Sep 2016 14:50:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDA4429652 for ; Wed, 28 Sep 2016 14:50:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932863AbcI1Oty (ORCPT ); Wed, 28 Sep 2016 10:49:54 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33404 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933087AbcI1Ots (ORCPT ); Wed, 28 Sep 2016 10:49:48 -0400 Received: by mail-pf0-f195.google.com with SMTP id q2so2251184pfj.0 for ; Wed, 28 Sep 2016 07:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jB9UPPG4Nxodq4Mmh+c6sTI7yGQMWQcFvPp04TEblgw=; b=rs+SnfWxr7zxbpzD4lwdCuZpumm1JqXu//60PQOtbsHvMkUT9BGxF1nRXOgMGQZpjB JV+z81hOFDGIBqmOrdVznooFHIwWCChO6cPXBSPtkanI40i2awiigFmrxrhBdm1WUB76 yFPejsPm7rbg75kuY6xBxurDr3rbXApx3Ufl+TitPpyegtsJudDHwJhyQrhMNOuARv+M vxxGgBrDJYQFMpCkLah01rL+9JQMssS9QMSTC5OFBjJM8eO2y3pa2Q4bC52gVnd4Tmn2 Z2zCea1gDEm4K79EjSutNm1ODskK/UCEolO85NZR1hfuFUA0CQpCcmoihb9tq66XMEmq Y47g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jB9UPPG4Nxodq4Mmh+c6sTI7yGQMWQcFvPp04TEblgw=; b=PWkAy/aWUyrsrjHQWbFqOa1PcLEP2e/0EASGoFtUOaMCcQ/5Jc3jKHmfiEZFc82iQD dOiVsyBiM3audOwEHBEQLPYwad2FEnSv+44uos7lW2Y3FYmM4pL91y6tw/s8z2MFoQOE AFhauI7H/ulH8Q0f+Qh+jVVi5IQJEuNldNEBRshGyzA55jkmwoyhh6eRAkjx5zJfXELB wDDm2h41lcB8ezgf9clt0sxyAgrFlGLDXZarAwSqw5KOkoM/nrDLkUnFGBuA9l9ZaROc QseUo0znFBGM1SvqkkocZpTfC/yEcISPrU49r7ZUl1Yar+6IznXqtqySRif0k1YyOmLm eXsg== X-Gm-Message-State: AE9vXwMe5+AyxhAA+nBbxrjtA/w2UgFSl3xR47+6nRy80dAHG/x6uJwBBET7MqFo5pka3Q== X-Received: by 10.98.198.70 with SMTP id m67mr57868408pfg.34.1475074187765; Wed, 28 Sep 2016 07:49:47 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id ak3sm13315358pad.19.2016.09.28.07.49.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Sep 2016 07:49:47 -0700 (PDT) From: Wei Yongjun To: Vinayak Holikatti , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Wei Yongjun , linux-scsi@vger.kernel.org Subject: [PATCH -next] scsi: ufs: fix error return code in ufshcd_init() Date: Wed, 28 Sep 2016 14:49:42 +0000 Message-Id: <1475074182-13038-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Subhash Jadavani Reviewed-by: Kiwoong Kim --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 37f3c51..6aebb7e 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6500,6 +6500,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) if (IS_ERR(hba->devfreq)) { dev_err(hba->dev, "Unable to register with devfreq %ld\n", PTR_ERR(hba->devfreq)); + err = PTR_ERR(hba->devfreq); goto out_remove_scsi_host; } /* Suspend devfreq until the UFS device is detected */