summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/imx6q-b850v3.dts
diff options
context:
space:
mode:
authorKaike Wan <kaike.wan@intel.com>2020-05-11 23:13:28 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-03 08:21:19 +0200
commita38a75c22b9f5398091fd98f235ea4bfd0eb56a4 (patch)
tree4e11b5712138a9ad7e878145fa72007fc8106ad5 /arch/arm/boot/dts/imx6q-b850v3.dts
parent820be34d0137f180ee878192d406c8017c7cdcb8 (diff)
IB/qib: Call kobject_put() when kobject_init_and_add() fails
[ Upstream commit a35cd6447effd5c239b564c80fa109d05ff3d114 ] When kobject_init_and_add() returns an error in the function qib_create_port_files(), the function kobject_put() is not called for the corresponding kobject, which potentially leads to memory leak. This patch fixes the issue by calling kobject_put() even if kobject_init_and_add() fails. In addition, the ppd->diagc_kobj is released along with other kobjects when the sysfs is unregistered. Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters") Link: https://lore.kernel.org/r/20200512031328.189865.48627.stgit@awfm-01.aw.intel.com Cc: <stable@vger.kernel.org> Suggested-by: Lin Yi <teroincn@gmail.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Kaike Wan <kaike.wan@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/arm/boot/dts/imx6q-b850v3.dts')
0 files changed, 0 insertions, 0 deletions