No description
Find a file
Kuninori Morimoto 0f312dc1eb ASoC: simple-card: fixup asoc_simple_probe() error handling
commit 41bae58df4 upstream.

asoc_simple_probe() is used for both "DT probe" (A) and "platform probe"
(B). It uses "goto err" when error case, but it is not needed for
"platform probe" case (B). Thus it is using "return" directly there.

	static int asoc_simple_probe(...)
	{
 ^		if (...) {
 |			...
(A)			if (ret < 0)
 |				goto err;
 v		} else {
 ^			...
 |			if (ret < 0)
(B)				return -Exxx;
 v		}

		...
 ^		if (ret < 0)
(C)			goto err;
 v		...

	err:
(D)		simple_util_clean_reference(card);

		return ret;
	}

Both case are using (C) part, and it calls (D) when err case.
But (D) will do nothing for (B) case.
Because of these behavior, current code itself is not wrong,
but is confusable, and more, static analyzing tool will warning on
(B) part (should use goto err).

To avoid static analyzing tool warning, this patch uses "goto err"
on (B) part.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o7hy7mlh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-08 08:46:10 +01:00
arch MIPS: KVM: Fix a build warning about variable set but not used 2023-12-08 08:46:09 +01:00
block block: fix use-after-free of q->q_usage_counter 2023-10-10 21:53:36 +02:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:13:17 +02:00
crypto crypto: pcrypt - Fix hungtask for PADATA_RESET 2023-11-28 16:54:51 +00:00
Documentation overflow: Implement size_t saturating arithmetic helpers 2023-11-20 11:06:44 +01:00
drivers media: ccs: Correctly initialise try compose rectangle 2023-12-08 08:46:09 +01:00
fs nfsd: lock_rename() needs both directories to live on the same fs 2023-12-08 08:46:10 +01:00
include HID: fix HID device resource race between HID core and debugging support 2023-12-08 08:46:08 +01:00
init x86/mm: Initialize text poking earlier 2023-08-08 19:57:39 +02:00
io_uring io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid 2023-11-28 16:55:02 +00:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:24:00 +01:00
kernel lockdep: Fix block chain corruption 2023-12-08 08:46:09 +01:00
lib overflow: Implement size_t saturating arithmetic helpers 2023-11-20 11:06:44 +01:00
LICENSES
mm mm: kmem: drop __GFP_NOFAIL when allocating objcg vectors 2023-11-28 16:55:01 +00:00
net net/smc: avoid data corruption caused by decline 2023-12-08 08:46:08 +01:00
samples samples/hw_breakpoint: fix building without module unloading 2023-09-23 11:01:09 +02:00
scripts randstruct: Fix gcc-plugin performance mode to stay in group 2023-11-28 16:54:55 +00:00
security ima: detect changes to the backing overlay file 2023-11-28 16:54:57 +00:00
sound ASoC: simple-card: fixup asoc_simple_probe() error handling 2023-12-08 08:46:10 +01:00
tools tools/power/turbostat: Fix a knl bug 2023-11-28 16:54:55 +00:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:25:48 +01:00
virt KVM: fix memoryleak in kvm_init() 2023-04-05 11:23:43 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Remove DECnet support from kernel 2023-06-21 15:45:38 +02:00
Makefile Linux 5.10.202 2023-11-28 16:55:02 +00:00
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.