Re: [PATCH] vhost-vdpa: Refactor copy_to_user() usage in vhost_vdpa_get_config()
From: Al Viro
Date: Wed Sep 25 2024 - 16:50:32 EST
On Wed, Sep 25, 2024 at 08:48:16PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> Date: Wed, 25 Sep 2024 20:36:35 +0200
>
> Assign the return value from a copy_to_user() call to an additional
> local variable so that a kvfree() call and return statement can be
> omitted accordingly.
Ugly and unidiomatic.
> This issue was detected by using the Coccinelle software.
What issue?
> Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Nevermind (and I really need more coffee, seeing that I'd missed the
obvious indicator of garbage and failed to hit delete)...