mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
selftests/powerpc: Remove the path after initialization.
If there were no anamolies noted, then we can simply remove the log file and return, but only after the path variable has been initialized. Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://patch.msgid.link/20240930012757.2395-1-zhangjiao2@cmss.chinamobile.com
This commit is contained in:
parent
b196db2f53
commit
7ca93aa920
@ -313,16 +313,16 @@ static inline void end_verification_log(unsigned int tid, unsigned nr_anamolies)
|
||||
|
||||
fclose(f);
|
||||
|
||||
if (nr_anamolies == 0) {
|
||||
remove(path);
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf(logfile, logfilename, tid);
|
||||
strcpy(path, logdir);
|
||||
strcat(path, separator);
|
||||
strcat(path, logfile);
|
||||
|
||||
if (nr_anamolies == 0) {
|
||||
remove(path);
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Thread %02d chunk has %d corrupted words. For details check %s\n",
|
||||
tid, nr_anamolies, path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user