diff options
Diffstat (limited to 'drivers/crypto/msm/ice.c')
| -rw-r--r-- | drivers/crypto/msm/ice.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/crypto/msm/ice.c b/drivers/crypto/msm/ice.c index 027a0d0bd0b8..2788c0add14a 100644 --- a/drivers/crypto/msm/ice.c +++ b/drivers/crypto/msm/ice.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1608,7 +1608,18 @@ static int enable_ice_setup(struct ice_device *ice_dev) out_clocks: qcom_ice_enable_clocks(ice_dev, false); out_reg: - regulator_disable(ice_dev->reg); + if (ice_dev->is_regulator_available) { + if (qcom_ice_get_vreg(ice_dev)) { + pr_err("%s: Could not get regulator\n", __func__); + goto out; + } + ret = regulator_disable(ice_dev->reg); + if (ret) { + pr_err("%s:%pK: Could not disable regulator\n", + __func__, ice_dev); + goto out; + } + } out: return ret; } |
