lkml.org 
[lkml]   [2015]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] phy: exynos-mipi-video: Fixup the test for state->regmap
From
Date
syscon_regmap_lookup_by_phandle() returns ERR_PTR on error.
Thus don't use null test against state->regmap.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/phy/phy-exynos-mipi-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-exynos-mipi-video.c b/drivers/phy/phy-exynos-mipi-video.c
index f017b2f..d196493 100644
--- a/drivers/phy/phy-exynos-mipi-video.c
+++ b/drivers/phy/phy-exynos-mipi-video.c
@@ -59,7 +59,7 @@ static int __set_phy_state(struct exynos_mipi_video_phy *state,
else
reset = EXYNOS4_MIPI_PHY_SRESETN;

- if (state->regmap) {
+ if (!IS_ERR(state->regmap)) {
mutex_lock(&state->mutex);
regmap_read(state->regmap, offset, &val);
if (on)
--
1.9.1




\
 
 \ /
  Last update: 2015-02-26 05:01    [W:0.043 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site