From patchwork Fri Jul 24 18:23:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11684033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37A5813B4 for ; Fri, 24 Jul 2020 18:25:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15B1320825 for ; Fri, 24 Jul 2020 18:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595615112; bh=6vmXqSqcb3PPEIvuDeW52+V74jJx/+EfORuTXaAQGRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=NH7zzph5/r17S7x7C/O9Z4rNEjEo/+VKoDhpvGoP0i7lneaGvHFCPzU/nmRm5XemO QvxHvYQqlvJUGxmt30Hf1YaHUoPQ1gUdb8dNf2rjvLUJlCTl5i4wsPdMN85BG0NERO zbxn0HInlQCbY0sDl2H99KBZ6qn4qoQoOOHShDpk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727833AbgGXSY6 (ORCPT ); Fri, 24 Jul 2020 14:24:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:33882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbgGXSY4 (ORCPT ); Fri, 24 Jul 2020 14:24:56 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7448A207FC; Fri, 24 Jul 2020 18:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595615096; bh=6vmXqSqcb3PPEIvuDeW52+V74jJx/+EfORuTXaAQGRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OXkhhR7G6pSAwL8sE1LkECQ/6F8GRsV/gAnihb6EZG6tkqzuMSPCcqSzp2BtAg08A e8uf0NN94A+Nx0yxyK+dOGAewXfhy/90dy/VAn6o9cGAeP3luuZ9mhUc+HeQlaFS5B PI3prAVts3n0s5zpMcT+CrLEwKpHUDZhIDlKiOm8= From: Krzysztof Kozlowski To: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Russell King , Catalin Marinas , Will Deacon , Krzysztof Kozlowski , Markus Mayer , Roger Quadros , Tony Lindgren , Vladimir Zapolskiy , Kukjin Kim , Lukasz Luba , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org Cc: Olof Johansson , Arnd Bergmann Subject: [PATCH 10/16] memory: omap-gpmc: Consistently use !res for NULL checks Date: Fri, 24 Jul 2020 20:23:22 +0200 Message-Id: <20200724182328.3348-11-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200724182328.3348-1-krzk@kernel.org> References: <20200724182328.3348-1-krzk@kernel.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The driver already uses 'if (!res)' pattern in the probe function so be consistent. Signed-off-by: Krzysztof Kozlowski --- drivers/memory/omap-gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 76a9c700cbd5..ce0e7e2d7cff 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2393,7 +2393,7 @@ static int gpmc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, gpmc); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) + if (!res) return -ENOENT; gpmc_base = devm_ioremap_resource(&pdev->dev, res);