Re: [PATCH] spi: bcm-qspi: check for valid cs before applying chip select

From: Florian Fainelli
Date: Thu Jan 27 2022 - 13:59:14 EST




On 1/27/2022 10:53 AM, Kamal Dasu wrote:
Apply only valid chip select value. This change fixes case where chip
select is set to initial value of '-1' during probe and PM supend and
subsequent resume can try to use the value with undefined behaviour.
Also in case where gpio based chip select, the check in
bcm_qspi_chip_select() shall prevent undefined behaviour on resume.

Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver")
Signed-off-by: Kamal Dasu <kdasu.kdev@xxxxxxxxx>

Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx>

Thanks!
--
Florian