diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-10-01 19:44:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-01 09:13:18 +0100 |
commit | 40509aa7832306bd93faae648d4e2a3413938dcb (patch) | |
tree | 20acdcdbd586b0f0bfe8a01d782c088dda0c11fd /arch/powerpc/boot | |
parent | 004ff4e09bb5f8a7e3212c5ef2642944bc7c524a (diff) |
powerpc: Fix signedness bug in update_flash_db()
[ Upstream commit 014704e6f54189a203cc14c7c0bb411b940241bc ]
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@oracle.com>
Acked-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/powerpc/boot')
0 files changed, 0 insertions, 0 deletions