From: Nicolas Iooss Date: Sat, 26 Nov 2016 19:18:04 +0000 (+0100) Subject: libnvdimm, namespace: fix the type of name variable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=238b323a681dd4a5ea0c651fdf4e6ee91a09a9ba;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git libnvdimm, namespace: fix the type of name variable In create_namespace_blk(), the local variable "name" is defined as an array of NSLABEL_NAME_LEN pointers: char *name[NSLABEL_NAME_LEN]; This variable is then used in calls to memcpy() and kmemdup() as if it were char[NSLABEL_NAME_LEN]. Remove the star in the variable definition to makes it look right. Signed-off-by: Nicolas Iooss Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams --- diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index 3509cff68ef9..61636d135105 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -1997,7 +1997,7 @@ struct device *create_namespace_blk(struct nd_region *nd_region, struct nd_mapping *nd_mapping = &nd_region->mapping[0]; struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); struct nd_namespace_blk *nsblk; - char *name[NSLABEL_NAME_LEN]; + char name[NSLABEL_NAME_LEN]; struct device *dev = NULL; struct resource *res;