Re: [PATCH] staging: atomisp: move null check to earlier point

2020-08-07 Thread Dan Carpenter
Beyond that, though, I feel like the rules are stupid because I've seen more than a couple commit messages which were contorted to avoid imperative. My own standard for commit messages is that 1) Is the problem explained, especially what it looks like to user space? 2) Is it clear what the

Re: [PATCH] staging: atomisp: move null check to earlier point

2020-08-06 Thread Bjorn Helgaas
On Thu, Jul 30, 2020 at 11:45:45AM +0300, Dan Carpenter wrote: > On Wed, Jul 29, 2020 at 06:13:44PM +0300, Andy Shevchenko wrote: > > On Wed, Jul 29, 2020 at 5:00 PM Cengiz Can wrote: > > > > > > `find_gmin_subdev` function that returns a pointer to `struct > > > gmin_subdev` can return NULL. > >

Re: [PATCH] staging: atomisp: move null check to earlier point

2020-07-30 Thread Cengiz Can
On July 30, 2020 11:48:06 Dan Carpenter wrote: On Wed, Jul 29, 2020 at 06:13:44PM +0300, Andy Shevchenko wrote: On Wed, Jul 29, 2020 at 5:00 PM Cengiz Can wrote: `find_gmin_subdev` function that returns a pointer to `struct gmin_subdev` can return NULL. In `gmin_v2p8_ctrl` there's a

Re: [PATCH] staging: atomisp: move null check to earlier point

2020-07-30 Thread Dan Carpenter
On Wed, Jul 29, 2020 at 06:13:44PM +0300, Andy Shevchenko wrote: > On Wed, Jul 29, 2020 at 5:00 PM Cengiz Can wrote: > > > > `find_gmin_subdev` function that returns a pointer to `struct > > gmin_subdev` can return NULL. > > > > In `gmin_v2p8_ctrl` there's a call to this function but the

Re: [PATCH] staging: atomisp: move null check to earlier point

2020-07-29 Thread Andy Shevchenko
On Wed, Jul 29, 2020 at 5:00 PM Cengiz Can wrote: > > `find_gmin_subdev` function that returns a pointer to `struct > gmin_subdev` can return NULL. > > In `gmin_v2p8_ctrl` there's a call to this function but the possibility > of a NULL was not checked before its being dereferenced. ie: > > ``` >

[PATCH] staging: atomisp: move null check to earlier point

2020-07-29 Thread Cengiz Can
`find_gmin_subdev` function that returns a pointer to `struct gmin_subdev` can return NULL. In `gmin_v2p8_ctrl` there's a call to this function but the possibility of a NULL was not checked before its being dereferenced. ie: ``` /* Acquired here v */ struct gmin_subdev *gs =