From patchwork Thu Feb 26 03:48:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 5887221 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CC1ED9F38E for ; Thu, 26 Feb 2015 03:48:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01C5320382 for ; Thu, 26 Feb 2015 03:48:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D068520374 for ; Thu, 26 Feb 2015 03:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752868AbbBZDsP (ORCPT ); Wed, 25 Feb 2015 22:48:15 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:38075 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752401AbbBZDsO (ORCPT ); Wed, 25 Feb 2015 22:48:14 -0500 Received: by pdbfp1 with SMTP id fp1so9817878pdb.5 for ; Wed, 25 Feb 2015 19:48:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=g4GIDrWjyKU0IXAV29Phc5IeS1eO5rah5JbkhU0Dhx0=; b=UmQr+0Dk6iPGTduFPEzT0PlYYquWkPku6lKivYc1HG8zHbQVT3CG24UdkJpgdzQ9M3 tkrGTYfmuyzzy4ctQTGCEIVpjmz91zksJqSysRMzp1ecDneqw1kbQBAKlPk+a+T/Ekiz 32Jm3tiyWRvwtz27EY521kfN8uujGCZoZnO/PCCkLHCElZXShX0TyMariYAXkJtq84RS kmmJCB+34Finhvc8U8rtm8Ki2qUo7T8F4wvfp3p7RkU6poKgGE/i7ZmjIEX6g31bsaoq 2Ckh4LUO+uTn4vyf1eJ+q7ns5t/XyGG0NYVHSUvIVx4t5To7mDeHmhge1M92Ip07KMJe GsHA== X-Gm-Message-State: ALoCoQnnAdnQXHMmYsvIKNUTg7+lz4cJMewqpzUbjXec5KUAn1tVXvr38YnbkQKaqFkBfyBLFMOd X-Received: by 10.66.63.72 with SMTP id e8mr10857995pas.3.1424922493767; Wed, 25 Feb 2015 19:48:13 -0800 (PST) Received: from [192.168.0.103] (218-164-101-161.dynamic.hinet.net. [218.164.101.161]) by mx.google.com with ESMTPSA id ly7sm43656555pdb.1.2015.02.25.19.48.11 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 19:48:12 -0800 (PST) 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 X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP syscon_regmap_lookup_by_phandle() returns ERR_PTR on error. Thus don't use null test against state->regmap. Signed-off-by: Axel Lin Acked-by: Sylwester Nawrocki --- 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)