Received: by 10.223.164.202 with SMTP id h10csp3616534wrb; Tue, 28 Nov 2017 14:22:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMb/tPYGbS36v22+p6SnDlf1fKP3+ONshYrpDoY1Cc/ksTLlH1phTmyJtTjdS9hUAR/poBFt X-Received: by 10.101.101.211 with SMTP id y19mr628196pgv.191.1511907731586; Tue, 28 Nov 2017 14:22:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511907731; cv=none; d=google.com; s=arc-20160816; b=dPYeor3TYMOPnj9IfWi3SFoFjVPuA1pf05qBtBm1rh0w+MyaZFvXCdGk/a1J/bCSw3 YMPPvCm9IgurvgyICZQTOxGB/djBG3G04Tg20/ASUVb3jtqhcn8ISgnf8Oyup65kwVlu tr5oocpwXn5euVD27ycZd6u1noKs0LZ4tWEhj0npa8h2DaC6gTLJXYKTcD0lZT3p3j3x KkqIRghx/pZVQwIjXXUYEbn42dPIN0hZLmT+7dftZGqEEJS3USFIpPU/fTMdnZzKUTlL lpzhzAUBSuuJfJHRnFDmFdxJEUurhnyxMI3/+ioWCeelCN6WrxXDOW0/OowUWP/cpJlg 7V6Q== 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=7hHqXhttOvEDs+WUo0kAJn3qc+C0c7wCGkCn76Tw91c=; b=jvCc/kqzcg1GyVcq4t/a2VxFQemYDtjUlyr6yG0Ri0sGcIVDiejvYwhc97vVuCuimQ t2FSM0rztKgie6Dx9P8T0kEG4LltmBBCNCMiEvZJOZkNGpsiWuUsxDr5Pi0ERAe4yB2E qYpZi7a1/9RF57msJ1Qrju9kwS24OIfmW9Ahr8ZmdrCwsWf+d2H8xi+39rttMEC66oQh VJ694vDL3AvQvf4IzCGSGSQCCwAAmRibz5d8q+mMaj/VjujKE87ZqHGe+lGo8LwrS54o J2UKWpfCfqHfISAYtMyOpW8ARSvjF8gTnhKOPs5DVtGfwPhgwU7D6FGxs9VBxqUjt1yB yHeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CPy3zZVU; 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 a34si152624pld.281.2017.11.28.14.22.01; Tue, 28 Nov 2017 14:22:11 -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=CPy3zZVU; 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 S1753379AbdK1WT3 (ORCPT + 70 others); Tue, 28 Nov 2017 17:19:29 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:41855 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752260AbdK1WT1 (ORCPT ); Tue, 28 Nov 2017 17:19:27 -0500 Received: by mail-lf0-f65.google.com with SMTP id f18so1597106lfg.8; Tue, 28 Nov 2017 14:19:26 -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=7hHqXhttOvEDs+WUo0kAJn3qc+C0c7wCGkCn76Tw91c=; b=CPy3zZVUk0rlNXlkmY3yGhNfo7xMYEhP41z32Y8ipXyzVi+fVF7u4ti51yOpCIrDGm 6Pmc6ctVX9cb7YXva7CvmQV4pUiyvBtGdy+Gn31NOH8uuS20Oqo1P7TTUEXjUSS13/ZO tF12FM+pNuioXi8vfGp4HVTmdxSPdBcgM1067XrkdoHBl67iFUt+D/i0gLHmOMfPWw/k /xeFAfxp/2MSkN8VyiW9Iz0MfFuRrC+aaDXjY+DELQkRG+unEjCBZEVih3T7bkeuzUcA OPxxRiB+b9tfFxoGa3p4pK8ErB7nY53aVnuRj90fpRCeWXx3sSrcbvPiHKZrXjoUG3V7 ymaQ== 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=7hHqXhttOvEDs+WUo0kAJn3qc+C0c7wCGkCn76Tw91c=; b=PjBuvwUxtxmgNypvpVVeRaUkLi0ZcdwvMG4o89aqXhgMEWUeIOst25u0OUUxur2con FxPKSqWuarZX0DPLAOAf3QB3peq7D6r7nmx63wyfRfkCN2JJWdQZMQGbxK4VaN2j/t/Y Qa0kibYhpwtugvJuUoBX/+zrhTg94UCrbtPzki1RbR56TIS6+QA9ijghjXzFc85QxlzQ eJ6UvINI7dopRS8GpK9EYBuXukGEsbMoE0ABaylkl2hRFG2UKe6EcsbdPm2ItjCB90LV 5hfefYNRAf6wMKYqQ6hYGG55NS3EN0bl2lQhdWs5gGx61+/p134PM1kUsvBEM7nz//Y3 h6/w== X-Gm-Message-State: AJaThX6T6BrT9jciWSR81L5RNH9hbN3t18v1wTSRNNKo6dAOXaf+8/or pFA5/JalllgwbEAy5UlyaTQ= X-Received: by 10.46.64.133 with SMTP id r5mr293513lje.30.1511907566216; Tue, 28 Nov 2017 14:19:26 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id 62sm36140lfw.31.2017.11.28.14.19.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Nov 2017 14:19:25 -0800 (PST) From: Vasyl Gomonovych To: thierry.reding@gmail.com, airlied@linux.ie, jonathanh@nvidia.com, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] drm/tegra: Use PTR_ERR_OR_ZERO() Date: Tue, 28 Nov 2017 23:19:18 +0100 Message-Id: <1511907558-13933-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/gpu/drm/tegra/drm.c:597: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/gpu/drm/tegra/drm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 52552b9b89ef..5718ca9a7943 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -594,10 +594,8 @@ static int tegra_gem_create(struct drm_device *drm, void *data, bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags, &args->handle); - if (IS_ERR(bo)) - return PTR_ERR(bo); - return 0; + return PTR_ERR_OR_ZERO(bo); } static int tegra_gem_mmap(struct drm_device *drm, void *data, -- 1.9.1 From 1585347591652942041@xxx Tue Nov 28 21:41:20 +0000 2017 X-GM-THRID: 1585347591652942041 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread