Explorar o código

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

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>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Axel Lin %!s(int64=10) %!d(string=hai) anos
pai
achega
cfd565d1e1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/phy/phy-exynos-mipi-video.c

+ 1 - 1
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)