Unverified Commit 858d4d9e authored by Santhosh Kumar K's avatar Santhosh Kumar K Committed by Mark Brown
Browse files

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: 0f3841a5 ("spi: cadence-qspi: report correct number of chip-select")
CC: stable@vger.kernel.org
Reviewed-by: default avatarPratyush Yadav <pratyush@kernel.org>
Reviewed-by: default avatarThéo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: default avatarSanthosh Kumar K <s-k6@ti.com>
Message-ID: <20250905185958.3575037-4-s-k6@ti.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1ad55767
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment