]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Drivers: hv: vmbus: Cleanup synic memory free path
authorMichael Kelley <mikelley@microsoft.com>
Thu, 2 Aug 2018 03:08:25 +0000 (03:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:40 +0000 (22:43 +0200)
commit4bb1d3ec658c9a1f071bab691c6e5778860efb6a
tree2d6c1c14f1eed2508df700be5759ae6b7aac38e3
parenteec63d96d0e40c8a2aac9e0b1e777e089983d692
Drivers: hv: vmbus: Cleanup synic memory free path

[ Upstream commit 572086325ce9a9e348b8748e830653f3959e88b6 ]

clk_evt memory is not being freed when the synic is shutdown
or when there is an allocation error.  Add the appropriate
kfree() call, along with a comment to clarify how the memory
gets freed after an allocation error.  Make the free path
consistent by removing checks for NULL since kfree() and
free_page() already do the check.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv.c