diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2022-11-01 23:54:01 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2022-12-01 19:43:41 +0300 |
commit | d043f9a1ca929eee76dac940b4ccfb5429e6098f (patch) | |
tree | cb78919ec7360df0fff047d2354ae00b868415c0 /drivers/md | |
parent | 19eb1650afeb1aa86151f61900e9e5f1de5d8d02 (diff) | |
download | linux-d043f9a1ca929eee76dac940b4ccfb5429e6098f.tar.xz |
dm ioctl: a small code cleanup in list_version_get_info
No need to modify info->vers if we overwrite it immediately.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 3bfc1583c20a..cdadc77fa4fc 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -681,7 +681,7 @@ static void list_version_get_info(struct target_type *tt, void *param) strcpy(info->vers->name, tt->name); info->old_vers = info->vers; - info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1); + info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1); } static int __list_versions(struct dm_ioctl *param, size_t param_size, const char *name) |