All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Minjie Du <duminjie@vivo.com>
Cc: Horatiu Vultur <horatiu.vultur@microchip.com>,
	UNGLinuxDriver@microchip.com (maintainer:MICROCHIP LAN966X
	ETHERNET DRIVER), "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	netdev@vger.kernel.org (open list:MICROCHIP LAN966X ETHERNET
	DRIVER), linux-kernel@vger.kernel.org (open list),
	opensource.kernel@vivo.com,
	Simon Horman <simon.horman@corigine.com>
Subject: Re: [PATCH net v4] net: lan966x: fix parameter check in two functions
Date: Tue, 18 Jul 2023 17:52:38 -0700	[thread overview]
Message-ID: <20230718175238.226810e3@kernel.org> (raw)
In-Reply-To: <20230717022235.1767-1-duminjie@vivo.com>

On Mon, 17 Jul 2023 10:22:35 +0800 Minjie Du wrote:
>  	vrule = vcap_get_rule(lan966x->vcap_ctrl, rule_id);
> -	if (vrule) {
> +	if (!IS_ERR_OR_NULL(vrule)) {

Please make vcap_get_rule() return an error pointer rather than NULL.
Mixing the two is a common source of errors.
-- 
pw-bot: cr

      reply	other threads:[~2023-07-19  0:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17  2:22 [PATCH net v4] net: lan966x: fix parameter check in two functions Minjie Du
2023-07-19  0:52 ` Jakub Kicinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230718175238.226810e3@kernel.org \
    --to=kuba@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=duminjie@vivo.com \
    --cc=edumazet@google.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=simon.horman@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.