powerpc: signedness bug in update_flash_db()

Michael Ellerman patch-notifications at ellerman.id.au
Mon Oct 15 15:01:01 AEDT 2018


On Mon, 2018-10-01 at 16:44:58 UTC, Dan Carpenter wrote:
> The "count < sizeof(struct os_area_db)" comparison is type promoted to
> size_t so negative values of "count" are treated as very high values and
> we accidentally return success instead of a negative error code.
> 
> This doesn't really change runtime much but it fixes a static checker
> warning.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> Acked-by: Geoff Levand <geoff at infradead.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/014704e6f54189a203cc14c7c0bb41

cheers


More information about the Linuxppc-dev mailing list