diff mbox

phy: exynos-mipi-video: Fixup the test for state->regmap

Message ID 1424922488.2076.1.camel@phoenix (mailing list archive)
State New, archived
Headers show

Commit Message

Axel Lin Feb. 26, 2015, 3:48 a.m. UTC
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(-)

Comments

On 26/02/15 04:48, Axel Lin wrote:
> 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>

Thanks for the patch, I had this on my todo list.

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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)