public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* Coverity: pca953x_gpio_get_multiple(): Uninitialized variables
@ 2020-04-17 21:58 coverity-bot
  2020-04-17 22:15 ` Paul Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: coverity-bot @ 2020-04-17 21:58 UTC (permalink / raw)
  To: Paul Thomas
  Cc: Linus Walleij, Bartosz Golaszewski, Gustavo A. R. Silva,
	linux-next

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20200417 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Tue Apr 14 11:28:42 2020 -0400
    96d7c7b3e654 ("gpio: gpio-pca953x, Add get_multiple function")

Coverity reported the following:

*** CID 1492652:  Uninitialized variables  (UNINIT)
/drivers/gpio/gpio-pca953x.c: 499 in pca953x_gpio_get_multiple()
493     			if (ret < 0)
494     				return ret;
495     		}
496     		/* reg_val is relative to the last read byte,
497     		 * so only shift the relative bits
498     		 */
vvv     CID 1492652:  Uninitialized variables  (UNINIT)
vvv     Using uninitialized value "reg_val".
499     		value = (reg_val >> (i % 8)) & 0x01;
500     		__assign_bit(i, bits, value);
501     	}
502     	return ret;
503     }
504

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1492652 ("Uninitialized variables")
Fixes: 96d7c7b3e654 ("gpio: gpio-pca953x, Add get_multiple function")

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-17 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 21:58 Coverity: pca953x_gpio_get_multiple(): Uninitialized variables coverity-bot
2020-04-17 22:15 ` Paul Thomas
2020-04-17 22:45   ` Kees Cook
2020-04-17 23:17     ` Paul Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox