hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/isa/cs423x/cs4236.c
....@@ -1,22 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for generic CS4232/CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 chips
34 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
4
- *
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, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
- *
205 */
216
227 #include <linux/init.h>
....@@ -559,7 +544,7 @@
559544 static int dev;
560545 int err;
561546 struct snd_card *card;
562
- struct pnp_dev *cdev;
547
+ struct pnp_dev *cdev, *iter;
563548 char cid[PNP_ID_LEN];
564549
565550 if (pnp_device_is_isapnp(pdev))
....@@ -575,9 +560,11 @@
575560 strcpy(cid, pdev->id[0].id);
576561 cid[5] = '1';
577562 cdev = NULL;
578
- list_for_each_entry(cdev, &(pdev->protocol->devices), protocol_list) {
579
- if (!strcmp(cdev->id[0].id, cid))
563
+ list_for_each_entry(iter, &(pdev->protocol->devices), protocol_list) {
564
+ if (!strcmp(iter->id[0].id, cid)) {
565
+ cdev = iter;
580566 break;
567
+ }
581568 }
582569 err = snd_cs423x_card_new(&pdev->dev, dev, &card);
583570 if (err < 0)