phy: qcom-ufs: Remove unnecessary BUG_ON
authorVivek Gautam <vivek.gautam@codeaurora.org>
Tue, 8 Nov 2016 10:07:40 +0000 (15:37 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Nov 2016 23:05:44 +0000 (18:05 -0500)
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/phy/phy-qcom-ufs.c

index 18a5b495ad65accddda823338376678276b8f0e6..455064cd270d06e4897a27b52313688095639003 100644 (file)
@@ -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);