From patchwork Tue Jan 2 18:10:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 123195 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9253469qgn; Tue, 2 Jan 2018 10:11:13 -0800 (PST) X-Google-Smtp-Source: ACJfBotxVZTOdF5zTLaug+3U/JPeS2l8DPE63FdZZu3bEOkedVV1UvZCT6+Kgb+qmYty3QQFo4HA X-Received: by 10.159.235.135 with SMTP id f7mr45871815plr.228.1514916672936; Tue, 02 Jan 2018 10:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514916672; cv=none; d=google.com; s=arc-20160816; b=jhFboThjBvRCS/gMDzhMITxqMu5zsRAIZS0qxaI/dM29rp+pIToY7D4PIbyChY7ZoQ gp38xpuLbg7aTzLdSlSlgi86nYFqCiEyr4LoVMcV8pePBl+3q4ZS+hZflqjjkK0z0YhA f6nYwbaYWXWAy9P1+3uILrrfh9lZ4QMyy5tG4zzkL58NVPepWrEWwbQKFGe/U21SZ0Rn aK3wO+ilHnbvuiFKKMvIi65b7HvcGiUDmeuGgaeiPMsZ4rQ7ACYO3C9Dl/GqyEAsoHyo ET6uvOmzDTiKM78jrkhdOtmqYapRSKUNZBTd6uwSq1+WAZDXn4BZVz2Vaj+oa7jwa8zw op3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=9z5H0QG8Wjxm/keo1S0I8S9W0YmKb9IT8oC5BQTQfSg=; b=uYOOrAdIpLHb0fK7lCFgPDuP2WX98nAK8smJrU4rSjj6+ANGSQwgG2AhY5qcw7F0f1 LzZvnawleAhiyH+Sua2Exy30hIiQliT1aJ7ZMNQl6nccQrF51Yr0UzbWMIeqI5QnPW+m UCFOufLy7LQP0UYEHrq9VcVgiElDJV0wXne2W7oGMCgSd3yha760FRhMV9MmUamyQTxf R0XARTlS9ckcaQkeywahkgkC/QsakvnT6sA8ZT5ehLVo0hIbluauAIICGz35JiRCcJu2 Eujw5SiSNXyPNfWnJ03goKnwGFwgea73zPn54QQKIh6m8FzrSkKa7Waxh3CnDccsezgD cPIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ut9BvO9B; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si20616653pgb.632.2018.01.02.10.11.12; Tue, 02 Jan 2018 10:11:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=@linaro.org header.s=google header.b=Ut9BvO9B; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751471AbeABSLL (ORCPT + 2 others); Tue, 2 Jan 2018 13:11:11 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:42156 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbeABSLJ (ORCPT ); Tue, 2 Jan 2018 13:11:09 -0500 Received: by mail-wm0-f65.google.com with SMTP id b141so15937552wme.1 for ; Tue, 02 Jan 2018 10:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ap7PIDbdP0kIKFsfZFoJSupgqHYzbJtDhY/MY+lu04Y=; b=Ut9BvO9BvkQqD3J9LyX01Y5d0n7HZgQQGtTTXAkTobsxWBia92wGecnfzhXKbLAPV/ BHM9EakU8Cx0l9I9xWlKAoy1rt1x/Zb+ldbs5rnotr6kXoXxIoizZzX+ounXXXDqID7K ULNkJkPgesfNny5ZV64fCqQXK+kUnrfZGMNAs= 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:in-reply-to :references; bh=Ap7PIDbdP0kIKFsfZFoJSupgqHYzbJtDhY/MY+lu04Y=; b=IGK4qqBO3pzr3O87e6+u3FZO6iTrEor9+DMzmEtRB2FtviqvxvwrzFGwhntB1fsLN3 IpXl3A+Ed6Md4n+xirhynAvtWHw4hARntdgUb8qBjEVX9SQ2/FWw92XuJcXO91bceyqr zOZ/n7s5EZlDmma+t27Yt1+VZ2FQvjoHcKQFDv+Xg5fYvN13hLRc6ta8ztIG9Yuf2dlM ohRP4cQvg2ZG6xGmKoP9G1StcZ3hKIzUe8bLLiGuBzz51ml6LBLBW7Xc1TR9L0lNHKLS B2GPq15ClFPa+MjJo0V27L0rqha/Z4rDQwhw6u6yO8wcIuod7GbriRg7SJEertp1RyT/ bBHw== X-Gm-Message-State: AKGB3mIk+LHM0OEcBbL/LE4t6hvgHKAFutrPhw8ivVSVKDDGwvY3KPzV mO5NS+CG9XXaHOLGyDG1gQmzjL9vjDU= X-Received: by 10.28.230.138 with SMTP id e10mr29153740wmi.141.1514916666992; Tue, 02 Jan 2018 10:11:06 -0800 (PST) Received: from localhost.localdomain ([160.89.138.198]) by smtp.gmail.com with ESMTPSA id f5sm16496643wrh.24.2018.01.02.10.11.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 10:11:06 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Arvind Yadav , Matt Fleming , Stephen Boyd , Tyler Baicar , Vasyl Gomonovych Subject: [PATCH 3/5] efi: Use PTR_ERR_OR_ZERO() Date: Tue, 2 Jan 2018 18:10:40 +0000 Message-Id: <20180102181042.19074-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180102181042.19074-1-ard.biesheuvel@linaro.org> References: <20180102181042.19074-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Vasyl Gomonovych Fix ptr_ret.cocci warnings: drivers/firmware/efi/efi.c:610:8-14: 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 Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" 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/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 557a47829d03..8ce70c2e73d5 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -608,7 +608,7 @@ static int __init efi_load_efivars(void) return 0; pdev = platform_device_register_simple("efivars", 0, NULL, 0); - return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; + return PTR_ERR_OR_ZERO(pdev); } device_initcall(efi_load_efivars); #endif