hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/spmi/spmi.c
....@@ -1,14 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 and
6
- * only version 2 as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
135 #include <linux/kernel.h>
146 #include <linux/errno.h>
....@@ -356,7 +348,8 @@
356348 const struct spmi_driver *sdrv = to_spmi_driver(dev->driver);
357349
358350 pm_runtime_get_sync(dev);
359
- sdrv->remove(to_spmi_device(dev));
351
+ if (sdrv->remove)
352
+ sdrv->remove(to_spmi_device(dev));
360353 pm_runtime_put_noidle(dev);
361354
362355 pm_runtime_disable(dev);