| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Freescale 83xx USB SOC setup code |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2007 Freescale Semiconductor, Inc. |
|---|
| 5 | 6 | * 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. |
|---|
| 11 | 7 | */ |
|---|
| 12 | 8 | |
|---|
| 13 | 9 | |
|---|
| .. | .. |
|---|
| 221 | 217 | int ret = 0; |
|---|
| 222 | 218 | |
|---|
| 223 | 219 | 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); |
|---|
| 225 | 222 | return -ENODEV; |
|---|
| 223 | + } |
|---|
| 226 | 224 | prop = of_get_property(np, "phy_type", NULL); |
|---|
| 227 | 225 | |
|---|
| 228 | 226 | if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) { |
|---|