lkml.org 
[lkml]   [2023]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] phy: tegra: xusb: check return value of devm_kzalloc()
On Wed, May 31, 2023 at 10:39:50AM +0300, Claudiu Beznea wrote:
> 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: f67213cee2b3 ("phy: tegra: xusb: Add usb-role-switch support")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
>
> Hi,
>
> This has been addressed using kmerr.cocci script proposed for update
> at [1].
>
> Thank you,
> Claudiu Beznea
>
> [1] https://lore.kernel.org/all/20230530074044.1603426-1-claudiu.beznea@microchip.com/
>
> drivers/phy/tegra/xusb.c | 3 +++
> 1 file changed, 3 insertions(+)

Acked-by: Thierry Reding <treding@nvidia.com>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-06-01 11:41    [W:0.059 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site