From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Date: Mon, 10 Feb 2014 11:13:49 +0000 Subject: Re: [PATCH] backlight: replace kfree with put_device Message-Id: <20140210111349.GA21522@lee--X1> List-Id: References: <1391762601-4560-1-git-send-email-levex@linux.com> <003701cf25f6$3807c6d0$a8175470$%han@samsung.com> In-Reply-To: <003701cf25f6$3807c6d0$a8175470$%han@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: Jingoo Han Cc: 'Andrew Morton' , 'Levente Kurusa' , 'LKML' , 'Jean-Christophe Plagniol-Villard' , 'Tomi Valkeinen' , 'FBDEV list' , 'Bryan Wu' > > As per the comments on device_register, we shouldn't call kfree() > > right after a device_register() failure. Instead call put_device(), > > which in turn will call bl_device_release resulting in a kfree to the > > full structure. > >=20 > > Signed-off-by: Levente Kurusa >=20 > (+cc Bryan Wu, Lee Jones) >=20 > Acked-by: Jingoo Han Applied to temporary Backlight repo [1], thanks. [1] git://git.linaro.org/people/lee.jones/backlight.git --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog