Skip to content

Commit

Permalink
Input: tegra-kbc - allocate pdata before using it
Browse files Browse the repository at this point in the history
Following commit broke DT support for tegra-kbc by removing pdata
allocation completely:

   commit 023cea0
   Author: Shridhar Rasal <srasal@nvidia.com>
   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@st.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Viresh Kumar authored and Dmitry Torokhov committed Mar 27, 2012
1 parent 3183968 commit 131c713
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/keyboard/tegra-kbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 131c713

Please sign in to comment.