Re: [PATCH net v4] net: lan966x: fix parameter check in two functions

From: Jakub Kicinski
Date: Tue Jul 18 2023 - 20:54:18 EST


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