forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/vfio/platform/vfio_amba.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2013 - Virtual Open Systems
34 * Author: Antonios Motakis <a.motakis@virtualopensystems.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License, version 2, as
7
- * published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146
157 #include <linux/module.h>
....@@ -79,18 +71,13 @@
7971 return ret;
8072 }
8173
82
-static int vfio_amba_remove(struct amba_device *adev)
74
+static void vfio_amba_remove(struct amba_device *adev)
8375 {
84
- struct vfio_platform_device *vdev;
76
+ struct vfio_platform_device *vdev =
77
+ vfio_platform_remove_common(&adev->dev);
8578
86
- vdev = vfio_platform_remove_common(&adev->dev);
87
- if (vdev) {
88
- kfree(vdev->name);
89
- kfree(vdev);
90
- return 0;
91
- }
92
-
93
- return -EINVAL;
79
+ kfree(vdev->name);
80
+ kfree(vdev);
9481 }
9582
9683 static const struct amba_id pl330_ids[] = {