Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mathias Payer <mathias.payer@xxxxxxxxxxxxx>
Date: Sun, 9 Dec 2018 21:02:25 +0100

> Passing an int to the macro results in a compiler warning. One option would be
> to test for the individual errors (instead of using the macro) with the drawback
> that future extensions that return different errors may be missed. Another
> alternative is to test for negative values with the drawback that this bypasses
> the existing test macros.

The whole kernel is full of situations where an int is returned and if it's
negative it's an error.  Why is this location so different?

Just check < 0 and be done with it.



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux