summaryrefslogtreecommitdiffstats
path: root/drivers/spmi/spmi.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/spmi/spmi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index aa3edabc2..55f1cad83 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -356,7 +356,8 @@ static int spmi_drv_remove(struct device *dev)
const struct spmi_driver *sdrv = to_spmi_driver(dev->driver);
pm_runtime_get_sync(dev);
- sdrv->remove(to_spmi_device(dev));
+ if (sdrv->remove)
+ sdrv->remove(to_spmi_device(dev));
pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);