From patchwork Wed Nov 29 16:22:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasyl Gomonovych X-Patchwork-Id: 10082745 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 AC0C66020B for ; Wed, 29 Nov 2017 16:23:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97632299C7 for ; Wed, 29 Nov 2017 16:23:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BB7929B2F; Wed, 29 Nov 2017 16:23:29 +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=unavailable 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 39BC4299C7 for ; Wed, 29 Nov 2017 16:23:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755562AbdK2QXD (ORCPT ); Wed, 29 Nov 2017 11:23:03 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:39321 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754705AbdK2QXC (ORCPT ); Wed, 29 Nov 2017 11:23:02 -0500 Received: by mail-lf0-f65.google.com with SMTP id l81so4534851lfl.6; Wed, 29 Nov 2017 08:23:00 -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=/wits9pK/IM33mMJFP07vkHccmcp+eGXUczuymCVs5s=; b=s7Tp/QnfxEIaxbhxFXl9UWICVcA4MVWEu7L5/+d14OCI3Mk9n+AVoAWygHhclDG8v7 3pANBVVmqaHGo7JmSXGC5cZpw61wS6bJkZcR2KDTRWWbAxGvYuWezQDAnWJUGyXxyYz7 2Ekt9UZT+UFeqUnOx3elF5Tcyl1QpZKPJaNx1HTD9V5/0oQvD9pvSShMiaKdHmCjwJge aNNLXembQZDAtlXOX4XB++BVaWV/+cliFyXP5eZ0yOnCZYz51mKt055BHh9CuIggkHjG gcINxrkBiZyACzgwYmz70KHLGVI+elPRCyJW/lPgTOqD5IDjjodMW1H2p+0/PfCDP+3L CfgQ== 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=/wits9pK/IM33mMJFP07vkHccmcp+eGXUczuymCVs5s=; b=ubKANUzv0B4jMl+3p6NaV+01SDNyPAXAL1NHcfwSz9Hit0gYyVDYWnZmqw2ZDyqUe9 SGds02IzdF5lFw6SwwVDYPGukGogiaZdAtEOS7+Kruh/9lfbVb47VKnTA/EwdU50jG6Z iiKzrbrvs4NyRLKbZVzfcNqnN+BfuRD4g0ynnya3kMbzMA9Uns8kvK9vkg4Ku+R5gYzg d9FENjlVvnkZFRq+TWagjQlTNzpTkS28NUIveQrh4y+PKREnL6wWndu8lRJY9aI0ohZL q5K1CXc4S/O0mazpw/w/uTJDlhXGg4oNTht0eiAtulTaJPPSDvs+9U2RMla6rLjRqBRZ KBYA== X-Gm-Message-State: AJaThX7QurMA4rxpq6OmGgEbLgad9yqRfMJxWI8a59oGDUMxgPg+JnQ0 DoVyACtQrSJyy+4AJYt2YPfTMDCt X-Google-Smtp-Source: AGs4zMYeaRTOIdrlVJbrF84wJStti43mDEJeoSebNzuK0Bx5rjQo43SZODy101AphIH39FXNawULwQ== X-Received: by 10.25.76.9 with SMTP id z9mr1356466lfa.144.1511972579601; Wed, 29 Nov 2017 08:22:59 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id g80sm440788ljf.89.2017.11.29.08.22.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Nov 2017 08:22:58 -0800 (PST) From: Vasyl Gomonovych To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Vasyl Gomonovych , Tomi Valkeinen , Bartlomiej Zolnierkiewicz , Laurent Pinchart , Mark Brown , linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: omap2: Use PTR_ERR_OR_ZERO() Date: Wed, 29 Nov 2017 17:22:48 +0100 Message-Id: <1511972570-30240-1-git-send-email-gomonovych@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix ptr_ret.cocci warnings: drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c:676: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/video/fbdev/omap2/omapfb/dss/hdmi4.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c index ec78d61bc551..28de56e21c74 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c @@ -673,10 +673,7 @@ static int hdmi_audio_register(struct device *dev) dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO, &pdata, sizeof(pdata)); - if (IS_ERR(hdmi.audio_pdev)) - return PTR_ERR(hdmi.audio_pdev); - - return 0; + return PTR_ERR_OR_ZERO(hdmi.audio_pdev); } /* HDMI HW IP initialisation */