From patchwork Sun Oct 5 22:44:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: subhashj@codeaurora.org X-Patchwork-Id: 5034791 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 48AA8C11AB for ; Sun, 5 Oct 2014 22:44:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F5FD201C8 for ; Sun, 5 Oct 2014 22:44:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3C5520131 for ; Sun, 5 Oct 2014 22:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbaJEWoY (ORCPT ); Sun, 5 Oct 2014 18:44:24 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:40902 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751596AbaJEWoX (ORCPT ); Sun, 5 Oct 2014 18:44:23 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 0AE9D13F927; Sun, 5 Oct 2014 22:44:23 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id F1A2013F92F; Sun, 5 Oct 2014 22:44:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from SUBHASHJ01 (cpe-66-75-43-156.san.res.rr.com [66.75.43.156]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: subhashj@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 90FC513F927; Sun, 5 Oct 2014 22:44:17 +0000 (UTC) From: "Subhash Jadavani" To: "'Dolev Raviv'" , , Cc: , , References: <1412518207-27135-1-git-send-email-draviv@codeaurora.org> In-Reply-To: <1412518207-27135-1-git-send-email-draviv@codeaurora.org> Subject: RE: [PATCH 1/1] ufs: scsi: fix sparse errors in ufshcd_system_suspend Date: Sun, 5 Oct 2014 15:44:16 -0700 Message-ID: <000301cfe0ed$e5221200$af663600$@codeaurora.org> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQIuf3CuNxzFz0mrlpNtlAblx8zIe5tk3K0w Content-Language: en-us X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Looks good, Reviewed-by: Subhash Jadavani -----Original Message----- From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Dolev Raviv Sent: Sunday, October 05, 2014 7:10 AM To: James.Bottomley@HansenPartnership.com; hch@infradead.org Cc: linux-scsi@vger.kernel.org; linux-arm-msm@vger.kernel.org; santoshsy@gmail.com; Dolev Raviv Subject: [PATCH 1/1] ufs: scsi: fix sparse errors in ufshcd_system_suspend This patch fixes newly introduced sparse warning in ufshcd_system_suspend, introduced by UFS power management series. Sparse warning: drivers/scsi/ufs/ufshcd.c:5118 ufshcd_system_suspend() error: we previously assumed 'hba' could be null (see line 5089) To fix it, we return 0 in case HBA is not initialized or is not powered. Signed-off-by: Dolev Raviv --- 1.8.5.2 -- QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" 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 497c38a..836ea72 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5087,7 +5087,7 @@ int ufshcd_system_suspend(struct ufs_hba *hba) int ret = 0; if (!hba || !hba->is_powered) - goto out; + return 0; if (pm_runtime_suspended(hba->dev)) { if (hba->rpm_lvl == hba->spm_lvl)