Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2230791ybi; Thu, 20 Jun 2019 11:15:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqOILQHIKSHj67pb+Z8tMoljGfcKrA/J44APkQyHpeYfIzfy//arHypYyspVxA70cP/r0E X-Received: by 2002:a63:dc50:: with SMTP id f16mr14227651pgj.447.1561054544380; Thu, 20 Jun 2019 11:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561054544; cv=none; d=google.com; s=arc-20160816; b=cU0iVM911wf+RSGszStHY/xNjoBZw2yCkhDUGuN2AX8fL0ERfeLtoMpagNxFpqTFKe 3KfG0g/VncHuUQdY8ETFhXE+AL94yy0FTKHA5VPS5byX7BYW+8w37PqBEqBUQR9kXD78 IdQ8xzlkVSEV/ZKfCDu9WI+rq2qEf1Axsut6pPRNAI8V1T9nm4kB4/Zu+6UAJI/vPN8W PNjk2C6OumAYiRxzyGB40+dN09j+tkz9YOE1VoJwloeyvUtH+YZCuIS1QjR8doH7CIYm EnLaPkeF74umP9cEwNHsGV4t1xPLePEeLiGMM1Lw1CbDNRA67KUeFfRrIzuMR8NjQ1jf vz6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3+WFExJtbS72Kowcu8qKKj5QBvo7JR9TWf8MfJHE3Ak=; b=mMjIjOEUCgd6tJHNVuR93NYdqQP1+7r0bOaajgmTlihUMHOYbQj6VbKeqSClHFxPek VK+i6ZAvDM7NZFQLEdX1xsKXVRuzhU0uFZjuNOdESWp1oxKHKVMU/uwXwxIgkTwYEDse DJdMalZI2+Fm2VJ45mTxY7dJ7TX46VxekuKTujnJFX/tI88VObtXGS13qgc2O1QESXLn m3fRxhBDqZ1Tg556ewyjQrHr+GyC95HPdpx2Y76QqpIjeObEkP6Q7R2dJU5jBhRJoYD8 8PV5eujlQIqL2vfXQn6Odj1bj8UC1TYiCyP8RjV4br8uPxBD6HaiZf+caDjqz2k66BUL MROw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ev/5+A6t"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si204009pfd.110.2019.06.20.11.15.29; Thu, 20 Jun 2019 11:15:44 -0700 (PDT) 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=@kernel.org header.s=default header.b="ev/5+A6t"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727336AbfFTSPV (ORCPT + 99 others); Thu, 20 Jun 2019 14:15:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:44036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729567AbfFTSPU (ORCPT ); Thu, 20 Jun 2019 14:15:20 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E5412082C; Thu, 20 Jun 2019 18:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561054519; bh=kf5RJKWA5oYAEDvJIm7IBbDOlA6XZbgSYxy+jrbqXkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ev/5+A6tdlUcLttKx4oMPtm5KcoWocf12B9FXrR0NYVTRnlpKYNE6hPSywq4fDLHc 8r7F2Uura2O0VCJNloJkN0Rkngfb456ifRdFGBmtJbXBSSTHpiBblRzP2qQbvwzQMo CWTdsP+XeqfX+n6JlkI11M2hYALR/8ATBIqx7VRA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ioana Radulescu , "David S. Miller" , Sasha Levin Subject: [PATCH 5.1 57/98] dpaa2-eth: Use PTR_ERR_OR_ZERO where appropriate Date: Thu, 20 Jun 2019 19:57:24 +0200 Message-Id: <20190620174351.929436971@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190620174349.443386789@linuxfoundation.org> References: <20190620174349.443386789@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit bd8460fa4de46e9d6177af4fe33bf0763a7af4b7 ] Use PTR_ERR_OR_ZERO instead of PTR_ERR in cases where zero is a valid input. Reported by smatch. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index 57cbaa38d247..df371c81a706 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -1966,7 +1966,7 @@ alloc_channel(struct dpaa2_eth_priv *priv) channel->dpcon = setup_dpcon(priv); if (IS_ERR_OR_NULL(channel->dpcon)) { - err = PTR_ERR(channel->dpcon); + err = PTR_ERR_OR_ZERO(channel->dpcon); goto err_setup; } @@ -2022,7 +2022,7 @@ static int setup_dpio(struct dpaa2_eth_priv *priv) /* Try to allocate a channel */ channel = alloc_channel(priv); if (IS_ERR_OR_NULL(channel)) { - err = PTR_ERR(channel); + err = PTR_ERR_OR_ZERO(channel); if (err != -EPROBE_DEFER) dev_info(dev, "No affine channel for cpu %d and above\n", i); -- 2.20.1