hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/powerpc/platforms/83xx/usb.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Freescale 83xx USB SOC setup code
34 *
45 * Copyright (C) 2007 Freescale Semiconductor, Inc.
56 * Author: Li Yang
6
- *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms of the GNU General Public License as published by the
9
- * Free Software Foundation; either version 2 of the License, or (at your
10
- * option) any later version.
117 */
128
139
....@@ -221,8 +217,10 @@
221217 int ret = 0;
222218
223219 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
224
- if (!np || !of_device_is_available(np))
220
+ if (!np || !of_device_is_available(np)) {
221
+ of_node_put(np);
225222 return -ENODEV;
223
+ }
226224 prop = of_get_property(np, "phy_type", NULL);
227225
228226 if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) {