mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
spi: tegra210-quad: Fix duplicate resource error
controller data alloc is done with client device data causing duplicate
resource error. Allocate memory using controller device when using devm
Fixes: f89d2cc396
("spi: tegra210-quad: use devm call for cdata memory")
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20221117070320.18720-1-kyarlagadda@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
804313b64e
commit
2197aa6b0a
@ -924,8 +924,9 @@ static int tegra_qspi_start_transfer_one(struct spi_device *spi,
|
||||
static struct tegra_qspi_client_data *tegra_qspi_parse_cdata_dt(struct spi_device *spi)
|
||||
{
|
||||
struct tegra_qspi_client_data *cdata;
|
||||
struct tegra_qspi *tqspi = spi_master_get_devdata(spi->master);
|
||||
|
||||
cdata = devm_kzalloc(&spi->dev, sizeof(*cdata), GFP_KERNEL);
|
||||
cdata = devm_kzalloc(tqspi->dev, sizeof(*cdata), GFP_KERNEL);
|
||||
if (!cdata)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user