Skip to content
Snippets Groups Projects
Commit 8d487a43 authored by Vasily Khoruzhick's avatar Vasily Khoruzhick Committed by Wolfram Sang
Browse files

i2c: s3c2410: fix oops in suspend callback for non-dt platforms


Initialize sysreg by default, otherwise driver will crash in suspend
callback when not using DT.

Signed-off-by: default avatarVasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Fixes: a7750c3e ("i2c: s3c2410: Handle i2c sys_cfg register in i2c driver")
parent 3e59ae4a
No related branches found
No related tags found
No related merge requests found
...@@ -1143,6 +1143,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) ...@@ -1143,6 +1143,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
i2c->quirks = s3c24xx_get_device_quirks(pdev); i2c->quirks = s3c24xx_get_device_quirks(pdev);
i2c->sysreg = ERR_PTR(-ENOENT);
if (pdata) if (pdata)
memcpy(i2c->pdata, pdata, sizeof(*pdata)); memcpy(i2c->pdata, pdata, sizeof(*pdata));
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment