hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/intersil/p54/p54spi.c
....@@ -1,23 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2008 Christian Lamparter <chunkeey@web.de>
34 * Copyright 2008 Johannes Berg <johannes@sipsolutions.net>
45 *
56 * This driver is a port from stlc45xx:
67 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License
10
- * version 2 as published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope that it will be useful, but
13
- * WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20
- * 02110-1301 USA
218 */
229
2310 #include <linux/module.h>
....@@ -177,7 +164,7 @@
177164
178165 ret = p54_parse_firmware(dev, priv->firmware);
179166 if (ret) {
180
- release_firmware(priv->firmware);
167
+ /* the firmware is released by the caller */
181168 return ret;
182169 }
183170
....@@ -672,6 +659,7 @@
672659 return 0;
673660
674661 err_free_common:
662
+ release_firmware(priv->firmware);
675663 free_irq(gpio_to_irq(p54spi_gpio_irq), spi);
676664 err_free_gpio_irq:
677665 gpio_free(p54spi_gpio_irq);