Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4455246ybv; Tue, 25 Feb 2020 20:40:46 -0800 (PST) X-Google-Smtp-Source: APXvYqxBW5atGcXtGcyPLI2zchHy/y2EEEA3lGhm5Soi9EWwcwSs8gAYIeWc4kUQH/KS3MkUnbRu X-Received: by 2002:a9d:64b:: with SMTP id 69mr1461035otn.237.1582692046221; Tue, 25 Feb 2020 20:40:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582692046; cv=none; d=google.com; s=arc-20160816; b=FC1scsvI/MppbDgjN+owLGeRQjcQiK7YC2HGaGC8zVMLHycYiWN0B0GajWttzyb9FH j9Ct31JXGktNthy8iJ9L86l0TaytCIW3X0UVfca2Ip/e8sq276TC7FaGB9BM3HQ0mQfw vKsTxjlfvu3pM7oLP9+A3AaVOdpM/QXrivU8kyqg5RJqAIj+v8u+Kr81138QqRW6K+06 IB2fKbN/RocOk7Rr71Ug0zavovrluihVhqDnoLfnaeOLM4Om1ymueM1Zzcreoo0PySjC jTUgoYyc49ByThKlu1O3jl7V1e8TKgrRPP0wjyNs+4FMPqqOneIrX2AXgOfRzaLMv7OQ mgDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=S9qCXyrFVqtvhs+1apspn5SB+TMFxAWskaq55t3hZVU=; b=NNLOgtbPv10HpLhb5jnQk49vvIobADKzv4IAHWst57qXDn2H8AE6cTGxFSl8fnNcsX Ii70GZF1Xrk+uXI+deszLHaxMaGy57mlG910vhvovTneoeg3E0uI7iIvoRuwQqM4t+De GbEfbtHQh27h2EhCAvTARHPOcpr6jDVbIkeVZ8my6LLan/kBezfYqXRbApVfE6wmyQxm LgU8/HqGv6EsXISYWuBy4xSUHt1wxihOzDo6ljMUv74VpaU7xiUy0RGR5p0jcgAqv8QR jbuLnL0JhdvHi2LrrLT2+Jr7BJiURHOnpXcPOs7cRsxc+ORufySVwgQZ+ZykAYdP0U76 +cug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si538056oic.77.2020.02.25.20.40.31; Tue, 25 Feb 2020 20:40:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726277AbgBZEkV (ORCPT + 99 others); Tue, 25 Feb 2020 23:40:21 -0500 Received: from inva021.nxp.com ([92.121.34.21]:50330 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbgBZEkU (ORCPT ); Tue, 25 Feb 2020 23:40:20 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 50C5F206666; Wed, 26 Feb 2020 05:40:19 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1F7AF20196B; Wed, 26 Feb 2020 05:40:13 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D11AB40246; Wed, 26 Feb 2020 12:40:05 +0800 (SGT) From: Anson Huang To: linux@armlinux.org.uk, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, kstewart@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] ARM: imx: Drop unnecessary src_base check Date: Wed, 26 Feb 2020 12:34:26 +0800 Message-Id: <1582691666-339-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org src_base is already checked during src driver initialization, no need to check its availability again when using it. Signed-off-by: Anson Huang --- arch/arm/mach-imx/src.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c index 0beea6d..f52f371 100644 --- a/arch/arm/mach-imx/src.c +++ b/arch/arm/mach-imx/src.c @@ -43,9 +43,6 @@ static int imx_src_reset_module(struct reset_controller_dev *rcdev, int bit; u32 val; - if (!src_base) - return -ENODEV; - if (sw_reset_idx >= ARRAY_SIZE(sw_reset_bits)) return -EINVAL; -- 2.7.4