Commit df49908
nfc: Fix potential resource leaks
nfc_get_device() take reference for the device, add missing
nfc_put_device() to release it when not need anymore.
Also fix the style warnning by use error EOPNOTSUPP instead of
ENOTSUPP.
Fixes: 5ce3f32 ("NFC: netlink: SE API implementation")
Fixes: 29e7692 ("nfc: netlink: Add capability to reply to vendor_cmd with data")
Signed-off-by: Miaoqian Lin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 30e7255 commit df49908
1 file changed
+38
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
| 1500 | + | |
1500 | 1501 | | |
1501 | 1502 | | |
1502 | 1503 | | |
| |||
1510 | 1511 | | |
1511 | 1512 | | |
1512 | 1513 | | |
1513 | | - | |
1514 | | - | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1515 | 1518 | | |
1516 | 1519 | | |
1517 | | - | |
1518 | | - | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1519 | 1524 | | |
1520 | 1525 | | |
1521 | | - | |
1522 | | - | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
1523 | 1530 | | |
1524 | 1531 | | |
1525 | | - | |
1526 | | - | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
1527 | 1536 | | |
1528 | 1537 | | |
1529 | 1538 | | |
1530 | 1539 | | |
1531 | | - | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
1532 | 1545 | | |
1533 | 1546 | | |
1534 | 1547 | | |
| |||
1551 | 1564 | | |
1552 | 1565 | | |
1553 | 1566 | | |
1554 | | - | |
| 1567 | + | |
1555 | 1568 | | |
1556 | 1569 | | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
1557 | 1575 | | |
1558 | 1576 | | |
1559 | 1577 | | |
1560 | | - | |
1561 | | - | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
1562 | 1582 | | |
1563 | 1583 | | |
1564 | 1584 | | |
| |||
1573 | 1593 | | |
1574 | 1594 | | |
1575 | 1595 | | |
1576 | | - | |
| 1596 | + | |
1577 | 1597 | | |
1578 | 1598 | | |
1579 | | - | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
1580 | 1604 | | |
1581 | 1605 | | |
1582 | 1606 | | |
| |||
0 commit comments