Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754389Ab3CPGRN (ORCPT ); Sat, 16 Mar 2013 02:17:13 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:38666 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198Ab3CPGRK (ORCPT ); Sat, 16 Mar 2013 02:17:10 -0400 From: Lokesh Vutla To: CC: , , , , , Oleksandr Dmytryshyn Subject: [PATCH V2 6/8] memory: emif: Fix the incorrect 'size' parameter in memcpy Date: Sat, 16 Mar 2013 11:46:46 +0530 Message-ID: <1363414608-7448-7-git-send-email-lokeshvutla@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363414608-7448-1-git-send-email-lokeshvutla@ti.com> References: <1363414608-7448-1-git-send-email-lokeshvutla@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1327 Lines: 37 From: Oleksandr Dmytryshyn 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 Signed-off-by: Lokesh Vutla Acked-by: Santosh Shilimkar --- Changes since V1: Updated $subject drivers/memory/emif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 8db74e4..d27111e 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -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__, -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/