[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a130fe6b-7b16-4ece-aa87-3d10d0f9efb3@intel.com>
Date: Mon, 9 Jun 2025 09:39:58 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
Shiju Jose <shiju.jose@...wei.com>
Cc: Davidlohr Bueso <dave@...olabs.net>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>, Li Ming <ming.li@...omail.com>,
Fan Ni <fan.ni@...sung.com>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] cxl: fix return value in
cxlctl_validate_set_features()
On 5/28/25 1:11 AM, Dan Carpenter wrote:
> The cxlctl_validate_set_features() function is type bool. It's supposed
> to return true for valid requests and false for invalid. However, this
> error path returns ERR_PTR(-EINVAL) which is true when it was intended to
> return false.
>
> Fixes: f76e0bbc8bc3 ("cxl: Update prototype of function get_support_feature_info()")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
Applied to cxl/fixes
> ---
> drivers/cxl/core/features.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
> index 6f2eae1eb126..7c750599ea69 100644
> --- a/drivers/cxl/core/features.c
> +++ b/drivers/cxl/core/features.c
> @@ -544,7 +544,7 @@ static bool cxlctl_validate_set_features(struct cxl_features_state *cxlfs,
> u32 flags;
>
> if (rpc_in->op_size < sizeof(uuid_t))
> - return ERR_PTR(-EINVAL);
> + return false;
>
> feat = cxl_feature_info(cxlfs, &rpc_in->set_feat_in.uuid);
> if (IS_ERR(feat))
Powered by blists - more mailing lists