.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2013 - Virtual Open Systems |
---|
3 | 4 | * 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. |
---|
13 | 5 | */ |
---|
14 | 6 | |
---|
15 | 7 | #include <linux/module.h> |
---|
.. | .. |
---|
79 | 71 | return ret; |
---|
80 | 72 | } |
---|
81 | 73 | |
---|
82 | | -static int vfio_amba_remove(struct amba_device *adev) |
---|
| 74 | +static void vfio_amba_remove(struct amba_device *adev) |
---|
83 | 75 | { |
---|
84 | | - struct vfio_platform_device *vdev; |
---|
| 76 | + struct vfio_platform_device *vdev = |
---|
| 77 | + vfio_platform_remove_common(&adev->dev); |
---|
85 | 78 | |
---|
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); |
---|
94 | 81 | } |
---|
95 | 82 | |
---|
96 | 83 | static const struct amba_id pl330_ids[] = { |
---|