mtd: harmonize mtd_point interface implementation
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / mtd / mtdcore.c
index ead52b3..b20346e 100644 (file)
@@ -706,6 +706,9 @@ int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,
              void **virt, resource_size_t *phys)
 {
        *retlen = 0;
+       *virt = NULL;
+       if (phys)
+               *phys = 0;
        if (!mtd->_point)
                return -EOPNOTSUPP;
        if (from < 0 || from > mtd->size || len > mtd->size - from)