aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/target/target_core_alua.c2
-rw-r--r--drivers/target/target_core_pr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index ea928c4d8854..3b4c450f0b06 100644
--- a/drivers/target/target_core_alua.c
+++ b/drivers/target/target_core_alua.c
@@ -733,7 +733,7 @@ static int core_alua_write_tpg_metadata(
733 if (ret < 0) 733 if (ret < 0)
734 pr_err("Error writing ALUA metadata file: %s\n", path); 734 pr_err("Error writing ALUA metadata file: %s\n", path);
735 fput(file); 735 fput(file);
736 return ret ? -EIO : 0; 736 return (ret < 0) ? -EIO : 0;
737} 737}
738 738
739/* 739/*
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index bd78faf67c6b..adec5a82a41f 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -1949,7 +1949,7 @@ static int __core_scsi3_write_aptpl_to_file(
1949 pr_debug("Error writing APTPL metadata file: %s\n", path); 1949 pr_debug("Error writing APTPL metadata file: %s\n", path);
1950 fput(file); 1950 fput(file);
1951 1951
1952 return ret ? -EIO : 0; 1952 return (ret < 0) ? -EIO : 0;
1953} 1953}
1954 1954
1955/* 1955/*