Skip to content

Commit

Permalink
selftests: arm64: Remove bogus error check on writing to files
Browse files Browse the repository at this point in the history
Due to some refactoring with the error handling we ended up mangling things
so we never actually set ret and therefore shouldn't be checking it.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210929151925.9601-3-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
Mark Brown authored and Will Deacon committed Sep 29, 2021
1 parent ff944c4 commit 4caf339
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tools/testing/selftests/arm64/fp/vec-syscfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ static int file_read_integer(const char *name, int *val)
static int file_write_integer(const char *name, int val)
{
FILE *f;
int ret;

f = fopen(name, "w");
if (!f) {
Expand All @@ -192,11 +191,6 @@ static int file_write_integer(const char *name, int val)

fprintf(f, "%d", val);
fclose(f);
if (ret < 0) {
ksft_test_result_fail("Error writing %d to %s\n",
val, name);
return -1;
}

return 0;
}
Expand Down

0 comments on commit 4caf339

Please sign in to comment.