lkml.org 
[lkml]   [2022]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] ASoC: max98090: Remove unneeded check in max98090_put_enab_tlv()
    On Thu, May 19, 2022 at 08:49:48PM +0300, Alexey Khoroshilov wrote:
    > On 19.05.2022 20:29, Mark Brown wrote:
    > > On Thu, May 19, 2022 at 08:10:12PM +0300, Alexey Khoroshilov wrote:

    > >> - if (sel < 0 || sel > mc->max)
    > >> + if (sel > mc->max)

    > > The check needs to be moved, not removed. The userspace ABI allows
    > > passing in of negative values.

    > Would (sel > mc->max) be enough in this case anyway?

    Oh, the check won't be working properly - it's just that like I say the
    fix is to move rather than remove it so it's operating on the signed
    value.
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2022-05-19 19:56    [W:3.267 / U:0.480 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site