aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2013-01-17 18:34:45 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 17:31:24 -0800
commitb786337d8c2867962348711e8d1211b292b6e3c5 (patch)
tree4d0179bee370162a17122a462cce2f36f539da1a /drivers/tty
parent7d9f49afa451d8565d00a5cea39acf9bb26feb50 (diff)
downloadkernel_goldelico_gta04-b786337d8c2867962348711e8d1211b292b6e3c5.zip
kernel_goldelico_gta04-b786337d8c2867962348711e8d1211b292b6e3c5.tar.gz
kernel_goldelico_gta04-b786337d8c2867962348711e8d1211b292b6e3c5.tar.bz2
serial: sccnxp: Fix possible crash if no platform data supplied
This patch fix possible kernel crash if no platform data supplied. We should not use platform data in this case, instead we will use default values from private driver structure. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sccnxp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c
index c864353..c5f0e96 100644
--- a/drivers/tty/serial/sccnxp.c
+++ b/drivers/tty/serial/sccnxp.c
@@ -891,9 +891,9 @@ static int sccnxp_probe(struct platform_device *pdev)
} else
memcpy(&s->pdata, pdata, sizeof(struct sccnxp_pdata));
- if (pdata->poll_time_us) {
+ if (s->pdata.poll_time_us) {
dev_info(&pdev->dev, "Using poll mode, resolution %u usecs\n",
- pdata->poll_time_us);
+ s->pdata.poll_time_us);
s->poll = 1;
}