Skip to content

Commit

Permalink
dm: remove unneeded variable 'sz'
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:
./drivers/md/dm-ps-service-time.c:85:10-12: Unneeded variable: "sz".
Return "0" on line 105

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
  • Loading branch information
Yang Li authored and intel-lab-lkp committed Mar 9, 2021
1 parent 8416f5e commit a0feb39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/md/dm-ps-service-time.c
Expand Up @@ -82,7 +82,6 @@ static void st_destroy(struct path_selector *ps)
static int st_status(struct path_selector *ps, struct dm_path *path,
status_type_t type, char *result, unsigned maxlen)
{
unsigned sz = 0;
struct path_info *pi;

if (!path)
Expand All @@ -102,7 +101,7 @@ static int st_status(struct path_selector *ps, struct dm_path *path,
}
}

return sz;
return 0;
}

static int st_add_path(struct path_selector *ps, struct dm_path *path,
Expand Down

0 comments on commit a0feb39

Please sign in to comment.