memory: emif: Fix the incorrect 'size' parameter in memcpy
authorOleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
Sat, 16 Mar 2013 06:16:46 +0000 (11:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 20:18:12 +0000 (13:18 -0700)
The issue was that only the first timings table was added to the
emif platform data at the emif driver registration. All other
timings tables was filled with zeros. Now all emif timings table
are added to the platform data.

Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/memory/emif.c

index b2bb27261c738c493ed7347e29114fbd63980106..9335339ebfdfea4e194e61d57dcb453857d2e7ee 100644 (file)
@@ -1468,7 +1468,7 @@ static struct emif_data *__init_or_module get_device_details(
        if (pd->timings) {
                temp = devm_kzalloc(dev, size, GFP_KERNEL);
                if (temp) {
-                       memcpy(temp, pd->timings, sizeof(*pd->timings));
+                       memcpy(temp, pd->timings, size);
                        pd->timings = temp;
                } else {
                        dev_warn(dev, "%s:%d: allocation error\n", __func__,