Commit 858d4d9
spi: cadence-quadspi: Fix cqspi_setup_flash()
The 'max_cs' stores the largest chip select number. It should only
be updated when the current 'cs' is greater than existing 'max_cs'. So,
fix the condition accordingly.
Also, return failure if there are no flash device declared.
Fixes: 0f3841a ("spi: cadence-qspi: report correct number of chip-select")
CC: stable@vger.kernel.org
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Message-ID: <20250905185958.3575037-4-s-k6@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 1ad5576 commit 858d4d9
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1722 | 1722 | | |
1723 | 1723 | | |
1724 | 1724 | | |
1725 | | - | |
1726 | 1725 | | |
1727 | 1726 | | |
1728 | 1727 | | |
1729 | | - | |
1730 | | - | |
| 1728 | + | |
1731 | 1729 | | |
1732 | 1730 | | |
1733 | 1731 | | |
| |||
1740 | 1738 | | |
1741 | 1739 | | |
1742 | 1740 | | |
1743 | | - | |
1744 | | - | |
1745 | 1741 | | |
1746 | 1742 | | |
| 1743 | + | |
| 1744 | + | |
1747 | 1745 | | |
1748 | 1746 | | |
1749 | 1747 | | |
| |||
1753 | 1751 | | |
1754 | 1752 | | |
1755 | 1753 | | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1756 | 1759 | | |
1757 | 1760 | | |
1758 | 1761 | | |
| |||
0 commit comments