Commit 352f0a4c authored by Alok Tiwari's avatar Alok Tiwari Committed by Greg Kroah-Hartman
Browse files

PCI: tegra: Fix devm_kcalloc() argument order for port->phys allocation



[ Upstream commit e1a8805e ]

Fix incorrect argument order in devm_kcalloc() when allocating port->phys.
The original call used sizeof(phy) as the number of elements and
port->lanes as the element size, which is reversed.  While this happens to
produce the correct total allocation size with current pointer size and
lane counts, the argument order is wrong.

Fixes: 6fe7c187 ("PCI: tegra: Support per-lane PHYs")
Signed-off-by: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
[mani: added Fixes tag]
Signed-off-by: default avatarManivannan Sadhasivam <mani@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250819150436.3105973-1-alok.a.tiwari@oracle.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8edbe1ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment