Re: [PATCH] driver core: faux: Move a variable assignment behind a condition check in faux_device_destroy()

From: Greg Kroah-Hartman

Date: Sun Jul 12 2026 - 10:11:00 EST


On Sun, Jul 12, 2026 at 03:56:09PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> Date: Sun, 12 Jul 2026 15:45:19 +0200
>
> The address of a data structure member was determined before
> a corresponding null pointer check in the implementation of
> the function “faux_device_destroy”.
>
> Thus avoid the risk for undefined behaviour by moving the assignment
> for the variable “dev” behind a condition check.

There is no such "undefined behavior" here, sorry, please fix your
tools.