[PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

Thomas Monjalon thomas at monjalon.net
Thu Dec 2 08:18:52 CET 2021


01/12/2021 22:37, Tyler Retzlaff:
> On Wed, Nov 24, 2021 at 06:04:56PM +0000, Bruce Richardson wrote:
> >   if (ret < 0 && rte_errno == EAGAIN)
> 
> i only urge that this be explicit as opposed to a range i.e. ret == -1
> preferred over ret < 0

I don't understand why you think it is important to limit return value to -1.
Why "if (ret == -1)" is better than "if (ret < 0)" ?




More information about the dev mailing list