From: Ulf Hansson Date: Thu, 26 Apr 2018 08:53:07 +0000 (+0200) Subject: i2c: Respect all error codes from dev_pm_domain_attach() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e6a20b6cd2b15a09044a00b9cdf080459e37eb2b;p=openwrt%2Fstaging%2Fblogic.git i2c: Respect all error codes from dev_pm_domain_attach() The limitation of being able to check only for -EPROBE_DEFER from dev_pm_domain_attach() has been removed. Hence let's respect all error codes and bail out accordingly. Signed-off-by: Ulf Hansson Acked-by: Wolfram Sang Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 1ba40bb2b966..a17f46a95f73 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -363,7 +363,7 @@ static int i2c_device_probe(struct device *dev) goto err_clear_wakeup_irq; status = dev_pm_domain_attach(&client->dev, true); - if (status == -EPROBE_DEFER) + if (status) goto err_clear_wakeup_irq; /*