From patchwork Tue Nov 28 22:32:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasyl Gomonovych X-Patchwork-Id: 10081197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 20DB1602DC for ; Tue, 28 Nov 2017 22:32:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1583F296B7 for ; Tue, 28 Nov 2017 22:32:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0909B29712; Tue, 28 Nov 2017 22:32:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6FA2296B7 for ; Tue, 28 Nov 2017 22:32:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752515AbdK1Wcv (ORCPT ); Tue, 28 Nov 2017 17:32:51 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:45518 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752101AbdK1Wcu (ORCPT ); Tue, 28 Nov 2017 17:32:50 -0500 Received: by mail-lf0-f67.google.com with SMTP id f13so1612330lff.12; Tue, 28 Nov 2017 14:32: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=FUhwKMAjqtgoizMS6waVd5fTTbxLYZ3eZrDbUV+iNtQ=; b=UetWEJ7viNj1LdUEMtXwdyeeV8eNQBdvb48SuYaOoJk07K51bk4IegWJjGvfZXULc0 89BlL8Sda6bdchVR4Scrx+CmCOKPT5ynFe/kPql8yTt5L3tMzrDvB4Mb5von8JeqSl0R aWfChREvcFndW7I/+OhN1Cab5uScT0SuE8uDnSeP4V+Q3t89Msc3nKDOGHI05A6zelaE fJ0Q0Ee5Jm+5AjGDEwuxHycrHhVmJoYrGQN81ez8GKJ6u99ke+E0QDtjQxyrAqPC1m1G cinQgkX6tC3F6UROGCU4sFBTlTMAsDsaOnRVtsbIjJHpmsWbfoPKP9yrq25UMb4RrWI5 GGSg== 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=FUhwKMAjqtgoizMS6waVd5fTTbxLYZ3eZrDbUV+iNtQ=; b=NXGvHlRX+OpyZqny9IQv/vMsFw8Z2prAuobcxhadCt9Vh2pLM5ctaUbyGzhTBbVoJL SDWkK8CAZrED+ZY1SVk9sJtRVnteT6DSZ9hUajlID81t9RBfbU6SDrZuo4CuP8MO+xS5 NoI9uvSgUSKhLEhau6Qd0gCIwHIoU4FkeKYIpYDkEAPG7nUUYPowQCA85BDhMkijBSDC vKNpgQWEDDVpYVBqElgSpX6TdhPY3yRslnVX52rRc0g3sZedfaSt/vBAgNVZdJoENHuW HNW01Wc7GUY8v1LIWj9y8gpnlHYkttaD4ztm/pHZv7dViq1R6+nqPBWK+A72VPVpBvrh ai/w== X-Gm-Message-State: AJaThX4tHrI5SAkrgdVxiZMgkosVw0opuF/yLHFhqfGhUXf2Kd2ymKTg WuWS4Ymvf4zgHvN1kbkYQh4= X-Google-Smtp-Source: AGs4zMZiRuNu76T5mqSSiIlG8QpKpbFkClQKHhG0j0fduEh8WvlcW14LfO26QucpkosYN8/IKtywzw== X-Received: by 10.25.203.17 with SMTP id b17mr236491lfg.5.1511908369135; Tue, 28 Nov 2017 14:32:49 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id 62sm39590lfw.31.2017.11.28.14.32.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Nov 2017 14:32:48 -0800 (PST) From: Vasyl Gomonovych To: ohad@wizery.com, bjorn.andersson@linaro.org, linux-remoteproc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] remoteproc: qcom: Use PTR_ERR_OR_ZERO() in glink prob Date: Tue, 28 Nov 2017 23:32:40 +0100 Message-Id: <1511908360-7712-1-git-send-email-gomonovych@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix ptr_ret.cocci warnings: drivers/remoteproc/qcom_common.c:60: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 --- drivers/remoteproc/qcom_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c index d487040b528b..e9b5f2a98c4d 100644 --- a/drivers/remoteproc/qcom_common.c +++ b/drivers/remoteproc/qcom_common.c @@ -57,7 +57,7 @@ static int glink_subdev_probe(struct rproc_subdev *subdev) glink->edge = qcom_glink_smem_register(glink->dev, glink->node); - return IS_ERR(glink->edge) ? PTR_ERR(glink->edge) : 0; + return PTR_ERR_OR_ZERO(glink->edge); } static void glink_subdev_remove(struct rproc_subdev *subdev)