Received: by 10.223.164.202 with SMTP id h10csp3181266wrb; Tue, 28 Nov 2017 07:23:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMaCQN0dc+8sxytoSOee/VTS6nIy8qE6qBLH6tyXWtLU2qPcPuhC67Zgs1GrIezGyOhq0RL7 X-Received: by 10.84.137.106 with SMTP id 97mr32345724plm.429.1511882600069; Tue, 28 Nov 2017 07:23:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511882600; cv=none; d=google.com; s=arc-20160816; b=o/zZedyca+KIkm+bxzZqLljZe1wX8n+LKa7gcu2dAfXNASErpfM2x/RtIfa/uV6LZ+ v4HOOdW24YddigTp7/MMB4B/ow8vhdquh/DEOkwpi6zGBSHuH4dKrg7mx2XVqRcxo5CO KPaJFPrEABs3ZuU07BuLnNJPfaIYaZJIPxGNT21zsyy9M+RG3rnTTLtex2w8yyolB1gw ZomuVpNUq3jaWDsCPSqR+QH/tZIX6IyVM765lHhmJ0xlEEKN2Zz+I571wbzc4Bzs0NzD kYVOk1plcJ0ypgyJilSqIPSLDPEvihX0mCxUU1r/ISvQwdYejc/qstLyA+3I63VoNQ9b 6ddw== 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 :dkim-signature:arc-authentication-results; bh=FkOEysk1iO4NlhGWKI/ZQ5EhaMDcBOAw+G6ss1S1m9g=; b=zBXzN2zfrKYG4cYH8XxIF6DTrahNX6OL8OvDt0zEhrVr1FF2vF7QvK+vJ/ElORLz83 0pTvVmnm0Kr5wEBnd2jrK+Uu9tZRqfrd2rb5I1gPpSuPqPjfQ+z7VZAhPSsxajqbLmsx Z+eiPfZg9e3xJmnaWdS59tZwPo9YzYlhJV+9qJ5yZofujhA/JujwoVUArcwKQmVqxm42 cIrZco3gSAnteRMUFvIJMv2BqoB1MdwQmm6zhmy9+zVnbvyZAvILVC1ZnD3VoQzcTh0c bo8MlLS9S1+P1biHvUpbYbNinCDk+N8gUXdnjLOO2QJhXsn1+dLw2hwR1AFwy/n+snPs 2n5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DjIveL4F; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m26si25177903pli.826.2017.11.28.07.23.07; Tue, 28 Nov 2017 07:23:20 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DjIveL4F; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753782AbdK1PVv (ORCPT + 78 others); Tue, 28 Nov 2017 10:21:51 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:42848 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752374AbdK1PVu (ORCPT ); Tue, 28 Nov 2017 10:21:50 -0500 Received: by mail-lf0-f66.google.com with SMTP id i2so193357lfe.9 for ; Tue, 28 Nov 2017 07:21:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FkOEysk1iO4NlhGWKI/ZQ5EhaMDcBOAw+G6ss1S1m9g=; b=DjIveL4FeeNzcrnIAo2maP36lRvR7qmw1NT9kPxNKWjupgnFSFtYN1tC4pqAAnZUHp /nI/zsVFCKyIoqCcHRylCgvTcS/3ir4jPqQXciKpp/h2B6rdlFNAeD5JRQl1WASthPX0 OoBnPOYVoizd+HOhPj2/0id3zp4+jfMqNPcJEv+lLEUOzZ/HfUaBlcgLRcZJMkoDR/wo 5BxLeXKa/DLMwCDf/S/Fd0NZ1muTeg+zCVtjre1xp3lOBkEMWTosDrF0iERvzZENCJCd m3wKL/SOmafk/DGKFh5pKT2rqNiROjzSftUmctEG6NV1OAmML1YzWVzJ58hiIeX9qSYW Ljog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FkOEysk1iO4NlhGWKI/ZQ5EhaMDcBOAw+G6ss1S1m9g=; b=hezU77PF2a8jQI8pQquoYKEpHbQFU1uCEA1pTtRtz0A3JyFXC8hV2fpUyDVU4sHRTg JXMX/1oEnDiZW+gvd+Y58PwRGeZn+/SEDt+IpupChcrqojHSrvnydNQ+zhB3G+3qG7nA pfvbHk52qFsEzBnaTu8lRR94JwKGYcAO28qGZKhjqn0IaToyd2ZRyfZMR9ImADTtoI10 Qrjsl24rpQQVomrY5Qe92BRQCbcSFwu/nieJKdxGIXwBwx5UOy8ZCGE5zexFL0EtpQDu aX75YvSDbMpAEehU2258AE6lIdxG85vIzHVvyVH206tBMW6TRg0hrO6iugG1o1fqXp26 ZaBw== X-Gm-Message-State: AJaThX70Ddxjen87+KLa1mHoBhIX3h9xgaA2jMGlY0t0I3AbzPeS8Rx9 7P73XcGtyP8T2j7ROWnmZ/w= X-Received: by 10.25.21.11 with SMTP id l11mr10320759lfi.142.1511882508602; Tue, 28 Nov 2017 07:21:48 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id c29sm4502379ljd.41.2017.11.28.07.21.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Nov 2017 07:21:47 -0800 (PST) From: Vasyl Gomonovych To: nicolas.ferre@microchip.com, alexandre.belloni@free-electrons.com, linux-pcmcia@lists.infradead.org, linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] pcmcia: at91_cf: Use PTR_ERR_OR_ZERO() Date: Tue, 28 Nov 2017 16:21:40 +0100 Message-Id: <1511882500-7285-1-git-send-email-gomonovych@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix ptr_ret.cocci warnings: drivers/pcmcia/at91_cf.c:239:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Vasyl Gomonovych --- drivers/pcmcia/at91_cf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 87147bcd1655..7da7b0f0ae1b 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c @@ -236,10 +236,8 @@ static int at91_cf_dt_init(struct platform_device *pdev) pdev->dev.platform_data = board; mc = syscon_regmap_lookup_by_compatible("atmel,at91rm9200-sdramc"); - if (IS_ERR(mc)) - return PTR_ERR(mc); - return 0; + return PTR_ERR_OR_ZERO(mc); } #else static int at91_cf_dt_init(struct platform_device *pdev) -- 1.9.1 From 1585634383329109398@xxx Sat Dec 02 01:39:46 +0000 2017 X-GM-THRID: 1585597665356561340 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread