diff options
author | 2016-01-31 16:55:04 -0800 | |
---|---|---|
committer | 2016-01-31 16:55:04 -0800 | |
commit | f3ca903fbbb0d26221a39cbebfe6dd4efbebd3ef (patch) | |
tree | cc317a177a169a55af82a8ab1eafe5245e2a7705 /drivers/base | |
parent | Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus (diff) | |
parent | base/platform: Fix platform drivers with no probe callback (diff) | |
download | linux-f3ca903fbbb0d26221a39cbebfe6dd4efbebd3ef.tar.gz linux-f3ca903fbbb0d26221a39cbebfe6dd4efbebd3ef.tar.bz2 linux-f3ca903fbbb0d26221a39cbebfe6dd4efbebd3ef.zip |
Merge tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fix from Greg KH:
"Here's a single driver core fix that resolves an issue a lot of users
have been hitting for a while now. It's been tested a lot and has
been in linux-next successfully for a while"
* tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
base/platform: Fix platform drivers with no probe callback
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/platform.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 73d6e5d39e33..f437afa17f2b 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -558,10 +558,15 @@ static int platform_drv_probe(struct device *_dev) return ret; ret = dev_pm_domain_attach(_dev, true); - if (ret != -EPROBE_DEFER && drv->probe) { - ret = drv->probe(dev); - if (ret) - dev_pm_domain_detach(_dev, true); + if (ret != -EPROBE_DEFER) { + if (drv->probe) { + ret = drv->probe(dev); + if (ret) + dev_pm_domain_detach(_dev, true); + } else { + /* don't fail if just dev_pm_domain_attach failed */ + ret = 0; + } } if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) { |