path: root/drivers
diff options
authorManoj Chourasia <>2012-06-05 16:49:42 +0530
committerSimone Willett <>2012-06-06 17:35:54 -0700
commit5969910cc439df68c1a8d565708fd23f7f1aa795 (patch)
tree164274365a9b2a48ba8e80843dbf0820d6581836 /drivers
parent13f96891bd002d9626d535f9eb5786f2c65810ad (diff)
tty: serial: tegra-hsuart: Add check for platform data
It is not necessary that all platform do register platform data for tegra HS uart. platfrom_data pointer should be checked before accessing it. Added a check for same. bug 995731 Change-Id: I2dbbaa4387157b92b29bc7b8eacefad23372427e Signed-off-by: Manoj Chourasia <> Reviewed-on: http://git-master/r/106451 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sandeep Trasi <> Reviewed-by: Laxman Dewangan <>
Diffstat (limited to 'drivers')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/tegra_hsuart.c b/drivers/tty/serial/tegra_hsuart.c
index 484e228dc044..ea20de6ebb41 100644
--- a/drivers/tty/serial/tegra_hsuart.c
+++ b/drivers/tty/serial/tegra_hsuart.c
@@ -895,7 +895,7 @@ static int tegra_startup(struct uart_port *u)
goto fail;
pdata = u->dev->platform_data;
- if (pdata->is_loopback)
+ if (pdata && pdata->is_loopback)
t->mcr_shadow |= UART_MCR_LOOP;
dev_dbg(u->dev, "Requesting IRQ %d\n", u->irq);