]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
i2c: s3c2410: fix oops in suspend callback for non-dt platforms
authorVasily Khoruzhick <anarsoul@gmail.com>
Sun, 3 May 2015 18:13:10 +0000 (21:13 +0300)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 12 May 2015 16:13:46 +0000 (18:13 +0200)
Initialize sysreg by default, otherwise driver will crash in suspend
callback when not using DT.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Fixes: a7750c3ef01223 ("i2c: s3c2410: Handle i2c sys_cfg register in i2c driver")
drivers/i2c/busses/i2c-s3c2410.c

index 958c8db4ec30740e2d9aae00a7835256700d3424..297e9c9ac9432f5e645e06cf932710cd93c7f924 100644 (file)
@@ -1143,6 +1143,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        i2c->quirks = s3c24xx_get_device_quirks(pdev);
+       i2c->sysreg = ERR_PTR(-ENOENT);
        if (pdata)
                memcpy(i2c->pdata, pdata, sizeof(*pdata));
        else