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@xxxxxxx> --- drivers/tty/serial/sccnxp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index 0c86a0b..3fd83e3 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -897,9 +897,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; } -- 1.7.8.6 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html