From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753037AbbBZDsQ (ORCPT ); Wed, 25 Feb 2015 22:48:16 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:43259 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbbBZDsO (ORCPT ); Wed, 25 Feb 2015 22:48:14 -0500 Message-ID: <1424922488.2076.1.camel@phoenix> Subject: [PATCH] phy: exynos-mipi-video: Fixup the test for state->regmap From: Axel Lin To: Kishon Vijay Abraham I Cc: Sylwester Nawrocki , Kyungmin Park , "linux-samsung-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Thu, 26 Feb 2015 11:48:08 +0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org syscon_regmap_lookup_by_phandle() returns ERR_PTR on error. Thus don't use null test against state->regmap. Signed-off-by: Axel Lin --- 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