[PATCH] Input: tegra-kbc: Fix: Allocate pdata before using it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following commit broke DT support for tegra-kbc by removing pdata allocation
completely.

commit 023cea0ecfa2df034096c3f4afa796a0b2d1188a
Author: Shridhar Rasal <srasal@xxxxxxxxxx>
Date:   Fri Feb 3 00:27:30 2012 -0800

    Input: tegra-kbc - allow skipping setting up some of GPIO pins

This patch restores it.

Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxx>
---
 drivers/input/keyboard/tegra-kbc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 96ee31e..5827fbe 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -630,6 +630,7 @@ tegra_kbc_dt_parse_pdata(struct platform_device *pdev)
 	if (!np)
 		return NULL;
 
+	pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
 	if (!pdata)
 		return NULL;
 
-- 
1.7.10.rc2.10.gb47606

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux