public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: bootrom: fix uninitialized variables
@ 2020-01-25  8:44 Saurav Girepunje
  2020-01-25 10:00 ` Johan Hovold
  2020-01-27  8:09 ` Dan Carpenter
  0 siblings, 2 replies; 5+ messages in thread
From: Saurav Girepunje @ 2020-01-25  8:44 UTC (permalink / raw)
  To: vireshk, johan, elder, gregkh, greybus-dev, devel, linux-kernel
  Cc: saurav.girepunje

fix uninitialized variables issue found using static code analysis tool

(error) Uninitialized variable: offset
(error) Uninitialized variable: size

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
  drivers/staging/greybus/bootrom.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
index a8efb86..9eabeb3 100644
--- a/drivers/staging/greybus/bootrom.c
+++ b/drivers/staging/greybus/bootrom.c
@@ -245,7 +245,7 @@ static int gb_bootrom_get_firmware(struct gb_operation *op)
  	struct gb_bootrom_get_firmware_request *firmware_request;
  	struct gb_bootrom_get_firmware_response *firmware_response;
  	struct device *dev = &op->connection->bundle->dev;
-	unsigned int offset, size;
+	unsigned int offset = 0, size = 0;
  	enum next_request_type next_request;
  	int ret = 0;
  
-- 
1.9.1


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

end of thread, other threads:[~2020-01-27 14:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-25  8:44 [PATCH] staging: greybus: bootrom: fix uninitialized variables Saurav Girepunje
2020-01-25 10:00 ` Johan Hovold
2020-01-25 12:14   ` SAURAV GIREPUNJE
2020-01-27 14:10     ` [greybus-dev] " Alex Elder
2020-01-27  8:09 ` Dan Carpenter

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