From patchwork Thu Apr 26 10:29:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 134463 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2073363lji; Thu, 26 Apr 2018 03:29:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoy7XMEFZfZqY99NTSPuM+DHBeQf4DS3q2Q3UI1z08utZRg+ptIkQ0rsPFKlSvO6skbBDfT X-Received: by 2002:a17:902:8343:: with SMTP id z3-v6mr12551026pln.71.1524738591511; Thu, 26 Apr 2018 03:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524738591; cv=none; d=google.com; s=arc-20160816; b=a5BJKVPvPuffEpFLYTyn/w2YVD5JJhFg8nYuN8qRCyt8mcOFyaCv+HWMalrmgT9wAs e86Apyva5xzmkj0JPig/zOAu5nJGsxteD/wjBlyjBmnYlSGf7DyraFJetDQNIK4HhUV+ LWhlnQek02RlR0BckGkPfyUbI30jNhz6KgmAy/r8ivTkgZbo+/Yd7ymzBTtnyRTzFTpK +cmKZOXlA2OOZa37Gh7pmIOIOZtOMxmZFwgspgwy1uNYD/SHZ6KCGHmyo27DpjJTuF9G pVxxkNmqew6dzuCL3RuTgWaYKDpaSEO7y0wlT3/cVcoMZopu8S6mFH6h52zh18n+VqW2 ULYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature:arc-authentication-results; bh=SAE0fGiDaAt5MOK7wzC1qo5RnNivowqvKccvCFzEBQA=; b=VzeRainPiD0Fumllj5xy7pVSN0JgjrZNpx99GXtOf0nfKWntuS1qhAw9ckKMLMuFx/ rKvdBgsliJBeBca/aa2dosXFTov9oPUqoj9GTSlgzyXWUFShJNgZDBvidaI8stsA1LIW ueh8p4qP/o3QFVOnWCcdDROnNMWBxJ++viCtpYhI8eylKXrrvAiurxOFS9TTkmv9DLNa ZMrd0yjltAOoCvsDSJP0lwm2fJXM9xYpyiV5wPQUeUKIXHcAl5MK5qMlHPiXT1P1ncIf DCEUc+QcvJDebOkEK/ayV2QWpJnjgYNIL0CGWZOd4CVGqhw6CSNt//c48qh12mOSAs0E 1eaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=baQ4yYAG; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g67si7176887pfe.4.2018.04.26.03.29.51; Thu, 26 Apr 2018 03:29:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=baQ4yYAG; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755359AbeDZK3t (ORCPT + 5 others); Thu, 26 Apr 2018 06:29:49 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:55473 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755197AbeDZK3s (ORCPT ); Thu, 26 Apr 2018 06:29:48 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3QATd9Y001396; Thu, 26 Apr 2018 05:29:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524738579; bh=dfSG4AucX7ELsVfBiuEFwugTV/d9qe8z9FCtS6ugpbE=; h=From:To:CC:Subject:Date; b=baQ4yYAGzw3AwBS6GCp9JWkdkIFZ+5IfBA56Jj9fny7GXWucmXOF29NIxjYQFrFOb BDn7EhFQDYmqAkpV70goUR0jzOzQ/eo3YYXDJo1TQH2BmE3CfZOFC32kgYuknqJVMk HhdAPNXbHJjEBagGuXfFay8iCupoM80UD5PUtjU8= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3QATcl1025460; Thu, 26 Apr 2018 05:29:38 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 26 Apr 2018 05:29:36 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 26 Apr 2018 05:29:36 -0500 Received: from dlelxv97.itg.ti.com (dlelxv97.itg.ti.com [172.17.2.193]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3QATaQI021040; Thu, 26 Apr 2018 05:29:36 -0500 Received: from lta0400828d.ti.com (vboxa0400828d.emea.dhcp.ti.com [172.22.233.119]) by dlelxv97.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3QATYc7001722; Thu, 26 Apr 2018 05:29:34 -0500 From: Roger Quadros To: CC: , , , Roger Quadros Subject: [PATCH] memory: omap-gpmc: Avoid redundant NULL check Date: Thu, 26 Apr 2018 13:29:32 +0300 Message-ID: <1524738572-23506-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org child->name cannot be NULL as we're already checking for it in gpmc_probe_dt_children() Signed-off-by: Roger Quadros --- drivers/memory/omap-gpmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- cheers, -roger Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 90a66b3..c215287 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2060,8 +2060,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, * timings. */ name = gpmc_cs_get_name(cs); - if (name && child->name && of_node_cmp(child->name, name) == 0) - goto no_timings; + if (name && of_node_cmp(child->name, name) == 0) + goto no_timings; ret = gpmc_cs_request(cs, resource_size(&res), &base); if (ret < 0) {