Re: [PATCH][next] platform/x86: intel_pmc_core: fix unsigned variable compared to less than zero

2021-04-20 Thread Hans de Goede
Hi Colin, On 4/20/21 2:10 PM, Colin King wrote: > From: Colin Ian King > > The check for ret < 0 is always false because ret is a (unsigned) size_t > and not a (signed) ssize_t, hence simple_write_to_buffer failures are > never detected. Fix this by making ret a ssize_t > > Addresses-Coverity:

[PATCH][next] platform/x86: intel_pmc_core: fix unsigned variable compared to less than zero

2021-04-20 Thread Colin King
From: Colin Ian King The check for ret < 0 is always false because ret is a (unsigned) size_t and not a (signed) ssize_t, hence simple_write_to_buffer failures are never detected. Fix this by making ret a ssize_t Addresses-Coverity: ("Unsigned compared against 0") Fixes: 8074a79fad2e