On Thu, 19 Dec 2024 15:12:06 -0500
Steven Rostedt <[email protected]> wrote:

> @@ -288,28 +280,22 @@ static ssize_t event_trigger_regex_write(struct file 
> *file,
>  
>       buf = memdup_user_nul(ubuf, cnt);
>       if (IS_ERR(buf))
> -             return PTR_ERR(buf);
> +             return PTR_ERR(no_free_ptr(buf));
>  

I just realized that __free(kfree) is defined as:

  DEFINE_FREE(kfree, void *, if (!IS_ERR_OR_NULL(_T)) kfree(_T))

where it can handle IS_ERR(), so the above doesn't need that no_free_ptr(buf).

-- Steve

Reply via email to