Re: [PATCH 10/13] USB: gadget: lpc32xx_udc: fix memory leak with using debugfs_lookup()

From: Vladimir Zapolskiy
Date: Thu Feb 02 2023 - 11:41:15 EST


On 2/2/23 17:32, Greg Kroah-Hartman wrote:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.

Cc: Vladimir Zapolskiy <vz@xxxxxxxxx>
Cc: Jakob Koschel <jakobkoschel@xxxxxxxxx>
Cc: Miaoqian Lin <linmq006@xxxxxxxxx>
Cc: linux-usb@xxxxxxxxxxxxxxx
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---

Acked-by: Vladimir Zapolskiy <vz@xxxxxxxxx>

--
Best wishes,
Vladimir