[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZDmJsemYldOsMMrH@smile.fi.intel.com>
Date: Fri, 14 Apr 2023 20:13:21 +0300
From: Andy Shevchenko <andy@...nel.org>
To: Markus Elfring <Markus.Elfring@....de>
Cc: kernel-janitors@...r.kernel.org, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans de Goede <hdegoede@...hat.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Xiaomeng Tong <xiam0nd.tong@...il.com>, cocci@...ia.fr,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: atomisp: Move a variable assignment behind a null
pointer check in atomisp_cp_general_isp_parameters()
On Thu, Apr 13, 2023 at 10:20:15PM +0200, Markus Elfring wrote:
> Date: Thu, 13 Apr 2023 22:08:42 +0200
>
> The address of a data structure member was determined before
> a corresponding null pointer check in the implementation of
> the function “atomisp_cp_general_isp_parameters”.
>
> Thus avoid the risk for undefined behaviour by moving the assignment
> for the variable “cur_config” behind the null pointer check.
I don't think this is what is happening here. The check might be removed by
optimizer in the compiler.
> This issue was detected by using the Coccinelle software.
>
> Fixes: ad85094b293e40e7a2f831b0311a389d952ebd5e ("Revert 'media: staging: atomisp: Remove driver'")
Wrong tag format.
Code-wise I'm not against this, but it's up to Hans.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists