mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
devm_kzalloc() returns a pointer to dynamically allocated memory.
Pointer could be NULL in case allocation fails. Check pointer validity.
Identified with coccinelle (kmerr.cocci script).
Fixes: f67213cee2 ("phy: tegra: xusb: Add usb-role-switch support")
Signed-off-by: Claudiu Beznea <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>