On Tue, Jun 21, 2022 at 03:28:40PM +0200, Jean Delvare wrote: > Unlike release_mem_region(), a call to release_resource() does not > free the resource, so it has to be freed explicitly to avoid a memory > leak. > > Signed-off-by: Jean Delvare <jdelvare@xxxxxxx> > Fixes: 0578fff4aae5 ("Watchdog: sp5100_tco: Add initialization using EFCH MMIO") > Cc: Terry Bowman <terry.bowman@xxxxxxx> > Cc: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx> > Cc: Guenter Roeck <linux@xxxxxxxxxxxx> Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx> Unless I am missing something, it looks like every caller of request_mem_region_muxed() has that problem. Guenter > --- > drivers/watchdog/sp5100_tco.c | 1 + > 1 file changed, 1 insertion(+) > > --- linux-5.18.orig/drivers/watchdog/sp5100_tco.c 2022-05-22 21:52:31.000000000 +0200 > +++ linux-5.18/drivers/watchdog/sp5100_tco.c 2022-06-21 15:07:31.868814828 +0200 > @@ -402,6 +402,7 @@ static int sp5100_tco_setupdevice_mmio(s > iounmap(addr); > > release_resource(res); > + kfree(res); > > return ret; > } > > > -- > Jean Delvare > SUSE L3 Support