Go to file
Yang Yingliang b5aa7fe19c pinctrl: core: fix possible memory leak when pinctrl_enable() fails
[ Upstream commit ae1cf47599 ]

In devm_pinctrl_register(), if pinctrl_enable() fails in pinctrl_register(),
the "pctldev" has not been added to dev resources, so devm_pinctrl_dev_release()
can not be called, it leads memory leak.

Introduce pinctrl_uninit_controller(), call it in the error path to free memory.

Fixes: 5038a66dad ("pinctrl: core: delete incorrect free in pinctrl_enable()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240606023704.3931561-2-yangyingliang@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:45:08 +02:00
arch powerpc/xmon: Fix disassembly CPU feature checks 2024-08-19 05:45:06 +02:00
block
certs
crypto
Documentation
drivers pinctrl: core: fix possible memory leak when pinctrl_enable() fails 2024-08-19 05:45:08 +02:00
fs fs/ntfs3: Fix getting file type 2024-08-19 05:45:08 +02:00
include net: missing check virtio 2024-08-19 05:45:06 +02:00
init
io_uring
ipc
kernel
lib
LICENSES
mm
net netfilter: nf_set_pipapo: fix initial map fill 2024-08-19 05:45:07 +02:00
samples
scripts
security
sound ASoC: max98088: Check for clk_prepare_enable() error 2024-08-19 05:45:05 +02:00
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.