.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * |
---|
3 | | - * |
---|
4 | 4 | * Copyright (C) 2005 Mike Isely <isely@pobox.com> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; either version 2 of the License |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | | - * |
---|
15 | 5 | */ |
---|
16 | 6 | |
---|
17 | 7 | #include <linux/string.h> |
---|
.. | .. |
---|
802 | 792 | void pvr2_sysfs_class_destroy(struct pvr2_sysfs_class *clp) |
---|
803 | 793 | { |
---|
804 | 794 | pvr2_sysfs_trace("Unregistering pvr2_sysfs_class id=%p", clp); |
---|
805 | | - class_unregister(&clp->class); |
---|
| 795 | + if (clp) |
---|
| 796 | + class_unregister(&clp->class); |
---|
806 | 797 | } |
---|
807 | 798 | |
---|
808 | 799 | |
---|