Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: drivers/net/usb/gobi/qmidevice.c

Issue 6695025: CHROMIUM: qcusbnet: don't leak clients_lock (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/kernel.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* qmidevice.c - gobi QMI device 1 /* qmidevice.c - gobi QMI device
2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
3 3
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation. 6 * only version 2 as published by the Free Software Foundation.
7 7
8 * This program is distributed in the hope that it will be useful, 8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 1370
1371 write_sync(dev, wbuf, wbufsize, QMICTL); 1371 write_sync(dev, wbuf, wbufsize, QMICTL);
1372 1372
1373 msleep(100); 1373 msleep(100);
1374 if (!down_trylock(&sem)) { 1374 if (!down_trylock(&sem)) {
1375 spin_lock_irqsave(&dev->qmi.clients_lock, flags); 1375 spin_lock_irqsave(&dev->qmi.clients_lock, flags);
1376 if (client_delread(dev, QMICTL, tid, &rbuf, &rbufsize)) { 1376 if (client_delread(dev, QMICTL, tid, &rbuf, &rbufsize)) {
1377 spin_unlock_irqrestore(&dev->qmi.clients_lock, f lags); 1377 spin_unlock_irqrestore(&dev->qmi.clients_lock, f lags);
1378 kfree(rbuf); 1378 kfree(rbuf);
1379 break; 1379 break;
1380 } else {
1381 spin_unlock_irqrestore(&dev->qmi.clients_lock, f lags);
1380 } 1382 }
1381 } else { 1383 } else {
1382 spin_lock_irqsave(&dev->qmi.clients_lock, flags); 1384 spin_lock_irqsave(&dev->qmi.clients_lock, flags);
1383 client_notify(dev, QMICTL, tid); 1385 client_notify(dev, QMICTL, tid);
1384 spin_unlock_irqrestore(&dev->qmi.clients_lock, flags); 1386 spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
1385 } 1387 }
1386 } 1388 }
1387 1389
1388 kfree(wbuf); 1390 kfree(wbuf);
1389 1391
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 DBG("bad get MEID resp\n"); 1585 DBG("bad get MEID resp\n");
1584 memset(&dev->meid[0], '0', 14); 1586 memset(&dev->meid[0], '0', 14);
1585 } 1587 }
1586 1588
1587 client_free(dev, cid); 1589 client_free(dev, cid);
1588 return 0; 1590 return 0;
1589 } 1591 }
1590 1592
1591 module_param(qcusbnet2k_fwdelay, int, S_IRUGO | S_IWUSR); 1593 module_param(qcusbnet2k_fwdelay, int, S_IRUGO | S_IWUSR);
1592 MODULE_PARM_DESC(qcusbnet2k_fwdelay, "Delay for old firmware"); 1594 MODULE_PARM_DESC(qcusbnet2k_fwdelay, "Delay for old firmware");
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698