Skip to contentSkip to conversation

ltpfs/main.c: Initialize return variable

PATCH In review Bogdan Lezhepekov 2 participants 4 messages Feb 16, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ltpfs/main.c: Initialize return variable

LTP_fs_open_block_device returned initialized local variable, when device handler is occupied.

---
 testcases/kernel/fs/scsi/ltpfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/fs/scsi/ltpfs/main.c +1 -1
index dc3e8f30c..2c67c7a47 100644
@@ -391,7 +391,7 @@ int LTP_fs_open_block_device()
 {
 	dev_t devt;
 	struct stat statbuf;
-	int rc;
+	int rc = 0;
 
 	if (ltp_block_dev_handle == 0) {
 
Signature · 5 lines
2.35.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v1 1/1
#1 lore raw

Hi Bogdan,

Quoted 1 line

LTP_fs_open_block_device returned initialized local

^ uninitialized ?

Quoted 1 line

variable, when device handler is occupied.

LGTM.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
Quoted 5 lines · Petr Vorel

Hi Bogdan,

Quoted 1 line

LTP_fs_open_block_device returned initialized local

^ uninitialized ?

Quoted 7 lines
Quoted 1 line

variable, when device handler is occupied.

LGTM.

Kind regards,
Petr

Oops, it's a typo. Obviously should be "uninitialized".

Want me to submit an update?

-Bogdan

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

Hi Bogdan,

Quoted 6 lines
Quoted 2 lines
Quoted 1 line

LTP_fs_open_block_device returned initialized local

^ uninitialized ?

Oops, it's a typo. Obviously should be "uninitialized".

Want me to submit an update?

No need, I fixed it before merge.

Merged as d66c51d92c.
Thanks!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp