forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/vme/bridges/vme_fake.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Fake VME bridge support.
34 *
....@@ -18,11 +19,6 @@
1819 *
1920 * Based on work by Tom Armistead and Ajit Prem
2021 * Copyright 2004 Motorola Inc.
21
- *
22
- * This program is free software; you can redistribute it and/or modify it
23
- * under the terms of the GNU General Public License as published by the
24
- * Free Software Foundation; either version 2 of the License, or (at your
25
- * option) any later version.
2622 */
2723
2824 #include <linux/device.h>
....@@ -1077,6 +1073,8 @@
10771073
10781074 /* We need a fake parent device */
10791075 vme_root = __root_device_register("vme", THIS_MODULE);
1076
+ if (IS_ERR(vme_root))
1077
+ return PTR_ERR(vme_root);
10801078
10811079 /* If we want to support more than one bridge at some point, we need to
10821080 * dynamically allocate this so we get one per device.