Re: [PATCH v2] iio: chemical: scd30: reject (response=NULL, size>0) in scd30_i2c_command()

From: Jonathan Cameron

Date: Mon May 11 2026 - 07:55:04 EST


On Fri, 8 May 2026 14:50:24 -0500
Maxwell Doose <m32285159@xxxxxxxxx> wrote:

> On Fri, May 8, 2026 at 2:16 PM Stepan Ionichev <sozdayvek@xxxxxxxxx> wrote:
> >
> > On Fri, 08 May 2026, Maxwell Doose wrote:
> > > I guess we're still handling the cases where both response/rsp and
> > > size are zero here below?
> > >
> > > Should add a comment showing that this handles this case but that's
> > > just my personal nit. Not worth forcing a v3 so
> > >
> > > Acked-by: Maxwell Doose <m32285159@xxxxxxxxx>
> >
> > Thanks for the ack and the review!
> >
> > You're right -- the (NULL, 0) write-command path is still handled
> > correctly by the existing rsp-NULL branch below; the new check only
> > rejects the genuinely buggy (NULL, size>0) combination. Happy to add
> > a short comment making that intent explicit if Jonathan would prefer
> > a v3, otherwise I'll keep it noted for a future cleanup.
> >
>
> BTW, if Jonathan asks you to resend for some other technical issue,
> please add that comment. Otherwise if he doesn't ask for v3 or doesn't
> include it himself, don't bother. Also, keep in mind that "Acked-by !=
> Reviewed-by". Just means the patch is appropriate for inclusion.

In my view it is a little borderline on whether such a comment
is useful given the fairly obvious && rather than || in the check
added. Anyhow, no other reason to respin to I've applied this as is.

Thanks,

Jonathan

>
> best regards,
> max