Message ID | 20250109001638.70033-1-joe@pf.is.s.u-tokyo.ac.jp (mailing list archive) |
---|---|
State | Accepted |
Commit | a266462b937beba065e934a563efe13dd246a164 |
Headers | show |
Series | [v2] usb: dwc3-am62: Fix an OF node leak in phy_syscon_pll_refclk() | expand |
On Thu, Jan 09, 2025, Joe Hattori wrote: > phy_syscon_pll_refclk() leaks an OF node obtained by > of_parse_phandle_with_fixed_args(), thus add an of_node_put() call. > > Cc: stable@vger.kernel.org > Fixes: e8784c0aec03 ("drivers: usb: dwc3: Add AM62 USB wrapper driver") > Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> > --- > Changes in v2: > - Add the stable tag. > --- > drivers/usb/dwc3/dwc3-am62.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c > index 5e3d1741701f..0a33ed958ebb 100644 > --- a/drivers/usb/dwc3/dwc3-am62.c > +++ b/drivers/usb/dwc3/dwc3-am62.c > @@ -166,6 +166,7 @@ static int phy_syscon_pll_refclk(struct dwc3_am62 *am62) > if (ret) > return ret; > > + of_node_put(args.np); > am62->offset = args.args[0]; > > /* Core voltage. PHY_CORE_VOLTAGE bit Recommended to be 0 always */ > -- > 2.34.1 > Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Thanks, Thinh
diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index 5e3d1741701f..0a33ed958ebb 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -166,6 +166,7 @@ static int phy_syscon_pll_refclk(struct dwc3_am62 *am62) if (ret) return ret; + of_node_put(args.np); am62->offset = args.args[0]; /* Core voltage. PHY_CORE_VOLTAGE bit Recommended to be 0 always */
phy_syscon_pll_refclk() leaks an OF node obtained by of_parse_phandle_with_fixed_args(), thus add an of_node_put() call. Cc: stable@vger.kernel.org Fixes: e8784c0aec03 ("drivers: usb: dwc3: Add AM62 USB wrapper driver") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> --- Changes in v2: - Add the stable tag. --- drivers/usb/dwc3/dwc3-am62.c | 1 + 1 file changed, 1 insertion(+)