Skip to content

Commit 68e2561

Browse files
Alex Shijmberg-intel
authored andcommitted
arch/um: remove unused varible err in remove_files_and_dir()
err is duplicated with errno, and never used; remove it. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Alex Shi <alexs@kernel.org> Link: https://patch.msgid.link/20260107064009.15380-1-alexs@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 7ede6f1 commit 68e2561

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

arch/um/os-Linux/umid.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static int remove_files_and_dir(char *dir)
136136
static inline int is_umdir_used(char *dir)
137137
{
138138
char pid[sizeof("nnnnnnnnn")], *end, *file;
139-
int fd, p, n, err;
139+
int fd, p, n;
140140
size_t filelen = strlen(dir) + sizeof("/pid") + 1;
141141

142142
file = malloc(filelen);
@@ -155,7 +155,6 @@ static inline int is_umdir_used(char *dir)
155155
goto out;
156156
}
157157

158-
err = 0;
159158
n = read(fd, pid, sizeof(pid));
160159
if (n < 0) {
161160
printk(UM_KERN_ERR "is_umdir_used : couldn't read pid file "

0 commit comments

Comments
 (0)