lkml.org 
[lkml]   [2023]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] platform/chrome: cros_ec_lpc: initialize the buf variable
From
Date
Hello:

This patch was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Tue, 10 Jan 2023 14:36:11 -0500 you wrote:
> Clang static analysis reports this problem
> drivers/platform/chrome/cros_ec_lpc.c:379:13: warning: The left operand
> of '!=' is a garbage value [core.UndefinedBinaryOperatorResult]
> if (buf[0] != 'E' || buf[1] != 'C') {
> ~~~~~~ ^
>
> The check depends on the side effect of the read. When the read fails
> or is short, a buf containing garbage could be mistaken as correct.
>
> [...]

Here is the summary with links:
- platform/chrome: cros_ec_lpc: initialize the buf variable
https://git.kernel.org/chrome-platform/c/2ae3c610e7d2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html


\
 
 \ /
  Last update: 2023-03-26 23:41    [W:3.079 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site