Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966426AbcKOJyz (ORCPT ); Tue, 15 Nov 2016 04:54:55 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:51926 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935704AbcKOJyx (ORCPT ); Tue, 15 Nov 2016 04:54:53 -0500 Date: Tue, 15 Nov 2016 12:54:34 +0300 From: Dan Carpenter To: Alan Tull Cc: Moritz Fischer , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] ARM: socfpga: checking the wrong variable Message-ID: <20161115095433.GD15424@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 675 Lines: 18 This is a cut and paste bug. We had intended to check "sysmgr". Fixes: e5f8efa5c8bf ("ARM: socfpga: fpga bridge driver support") Signed-off-by: Dan Carpenter diff --git a/drivers/fpga/altera-fpga2sdram.c b/drivers/fpga/altera-fpga2sdram.c index 7ab358e..d4eeb74 100644 --- a/drivers/fpga/altera-fpga2sdram.c +++ b/drivers/fpga/altera-fpga2sdram.c @@ -123,7 +123,7 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev) } sysmgr = syscon_regmap_lookup_by_compatible("altr,sys-mgr"); - if (IS_ERR(priv->sdrctl)) { + if (IS_ERR(sysmgr)) { dev_err(dev, "regmap for altr,sys-mgr lookup failed.\n"); return PTR_ERR(sysmgr); }