From patchwork Tue Nov 8 10:07:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 9417047 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 65E2E6022E for ; Tue, 8 Nov 2016 10:08:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 538CE28926 for ; Tue, 8 Nov 2016 10:08:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 477AE2893F; Tue, 8 Nov 2016 10:08:22 +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_SIGNED, 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 EE12D28926 for ; Tue, 8 Nov 2016 10:08:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932410AbcKHKIV (ORCPT ); Tue, 8 Nov 2016 05:08:21 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:59558 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932219AbcKHKIT (ORCPT ); Tue, 8 Nov 2016 05:08:19 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1443961459; Tue, 8 Nov 2016 10:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1478599699; bh=EViX4lTZNakGGyu+Sksis+Da3NvPOT7trb6CsV1EsQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aqtHFx7mnwIT0Gv+GcWBQOxVL9waMJwdCgsbwYpyJVhzbe1DOgBi5CQB/AUGEYQuV Ty7i+qRMddg9q1VrksXGNnWjLPZ0hlAf9gsaEKf3Hx3lsIi+WkN59uibP4pCjvbvCm T+76xT72gqLsACW/r6Ospfv7zx7Ln0ArLmnkIvZM= Received: from blr-ubuntu-41.ap.qualcomm.com (unknown [202.46.23.61]) (using TLSv1.1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 58B8E61469; Tue, 8 Nov 2016 10:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1478599698; bh=EViX4lTZNakGGyu+Sksis+Da3NvPOT7trb6CsV1EsQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M4U6GN4AhjKmt8GTemvfi8FuZQN5EAJQOHlG0vxFNckxU/arEAolB05S/HG7iE6DT M5Qrxk8fuaoeaJHW2OuLRhNDPx0Qx2nw4HG0qPSqMqqNIjxt/caSswG9nYz9ohJ/S0 uJI2gaoTXzcSPPgoOIQuWEe3sH4fc4xJCOf5d3eU= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 58B8E61469 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: kishon@ti.com, jejb@linux.vnet.ibm.com, vinholikatti@gmail.com, martin.petersen@oracle.com Cc: sboyd@codeaurora.org, subhashj@codeaurora.org, ygardi@codeaurora.org, linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vivek Gautam Subject: [PATCH v5 01/12] phy: qcom-ufs: Remove unnecessary BUG_ON Date: Tue, 8 Nov 2016 15:37:40 +0530 Message-Id: <1478599671-13071-2-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478599671-13071-1-git-send-email-vivek.gautam@codeaurora.org> References: <1478599671-13071-1-git-send-email-vivek.gautam@codeaurora.org> 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 BUG_ON() are not preferred in the driver, plus the variable on which BUG_ON is asserted is already checked in the code before passing. Signed-off-by: Vivek Gautam Reviewed-by: Subhash Jadavani --- drivers/phy/phy-qcom-ufs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index 18a5b49..455064c 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -322,8 +322,6 @@ int ufs_qcom_phy_cfg_vreg(struct phy *phy, struct ufs_qcom_phy *ufs_qcom_phy = get_ufs_qcom_phy(phy); struct device *dev = ufs_qcom_phy->dev; - BUG_ON(!vreg); - if (regulator_count_voltages(reg) > 0) { min_uV = on ? vreg->min_uV : 0; ret = regulator_set_voltage(reg, min_uV, vreg->max_uV);