[LTP] [PATCH v1] ltpfs/main.c: Initialize return variable
Bogdan Lezhepekov
blezhepekov@suse.de
Wed Feb 16 10:07:08 CET 2022
LTP_fs_open_block_device returned initialized local
variable, when device handler is occupied.
Signed-off-by: Bogdan Lezhepekov <blezhepekov@suse.de>
---
testcases/kernel/fs/scsi/ltpfs/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/fs/scsi/ltpfs/main.c b/testcases/kernel/fs/scsi/ltpfs/main.c
index dc3e8f30c..2c67c7a47 100644
--- a/testcases/kernel/fs/scsi/ltpfs/main.c
+++ b/testcases/kernel/fs/scsi/ltpfs/main.c
@@ -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) {
--
2.35.1
More information about the ltp
mailing list