Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1502683 > unrolled thread

[PATCH 2/7] phy: qcom-ufs: Remove unnecessary BUG_ON

Started byVivek Gautam <vivek.gautam@codeaurora.org>
First post2016-10-18 06:50 +0200
Last post2016-10-18 06:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/7] phy: qcom-ufs: Remove unnecessary BUG_ON Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 06:50 +0200

#1502683 — [PATCH 2/7] phy: qcom-ufs: Remove unnecessary BUG_ON

FromVivek Gautam <vivek.gautam@codeaurora.org>
Date2016-10-18 06:50 +0200
Subject[PATCH 2/7] phy: qcom-ufs: Remove unnecessary BUG_ON
Message-ID<stuvD-5o7-1@gated-at.bofh.it>
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 <vivek.gautam@codeaurora.org>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
---
 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 183ec04..805c91d 100644
--- a/drivers/phy/phy-qcom-ufs.c
+++ b/drivers/phy/phy-qcom-ufs.c
@@ -335,8 +335,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);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web