mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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>
This commit is contained in:
parent
7d9f49afa4
commit
b786337d8c
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue