On Mon Mar 11, 2024 at 11:31 PM EET, Eric Snowberg wrote: > > > > On Mar 11, 2024, at 1:18 PM, Jarkko Sakkinen <jar...@kernel.org> wrote: > > > > On Mon Mar 11, 2024 at 6:11 PM EET, Eric Snowberg wrote: > >> + return -1; > > > > Missed this one: why a magic number? > > Good point, I'll change this to return -ENOKEY. Thanks.
Either that or a boolean function, which ever fits to the overall flow better... The upside of error code is less branching in the call sites. The upside of boolean is that caller exactly knows all the values that ever should come out as a result. Your choice ofc. BR, Jarkko