linux-stable/include
Miquel Raynal e7952f4d62 nvmem: core: Return NULL when no nvmem layout is found
[ Upstream commit 81e1d9a395 ]

Currently, of_nvmem_layout_get_container() returns NULL on error, or an
error pointer if either CONFIG_NVMEM or CONFIG_OF is turned off. We
should likely avoid this kind of mix for two reasons: to clarify the
intend and anyway fix the !CONFIG_OF which will likely always if we use
this helper somewhere else. Let's just return NULL when no layout is
found, we don't need an error value here.

Link: https://staticthinking.wordpress.com/2022/08/01/mixing-error-pointers-and-null/
Fixes: 266570f496 ("nvmem: core: introduce NVMEM layouts")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202308030002.DnSFOrMB-lkp@intel.com/
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230823132744.350618-21-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:48:34 +02:00
..
acpi ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() 2023-06-15 18:05:19 +02:00
asm-generic word-at-a-time: use the same return type for has_zero regardless of endianness 2023-08-11 12:14:08 +02:00
clocksource
crypto crypto: api - Use work queue in crypto_destroy_instance 2023-09-13 09:48:03 +02:00
drm drm/display/dp: Fix the DP DSC Receiver cap size 2023-08-30 14:52:37 +02:00
dt-bindings dt-bindings: clock: Update GCC clocks for QDU1000 and QRU1000 SoCs 2023-09-13 09:48:22 +02:00
keys
kunit
kvm KVM: arm64: vgic-v4: Make the doorbell request robust w.r.t preemption 2023-07-27 08:56:43 +02:00
linux nvmem: core: Return NULL when no nvmem layout is found 2023-09-13 09:48:34 +02:00
math-emu
media media: cec: core: add adap_unconfigured() callback 2023-09-13 09:48:30 +02:00
memory
misc
net Bluetooth: ISO: Notify user space about failed bis connections 2023-09-13 09:48:07 +02:00
pcmcia
ras
rdma RDMA/cma: Always set static rate to 0 for RoCE 2023-06-11 11:26:02 +03:00
rv
scsi scsi: core: Use 32-bit hostnum in scsi_host_lookup() 2023-09-13 09:48:33 +02:00
soc net: dsa: felix: make vsc9959_tas_guard_bands_update() visible to ocelot->ops 2023-07-23 13:53:40 +02:00
sound ASoC: Intel: avs: Account for UID of ACPI device 2023-05-22 11:18:24 +01:00
target scsi: target: iscsi: Remove unused transport_timer 2023-05-22 16:29:39 -04:00
trace jbd2: remove journal_clean_one_cp_list() 2023-08-30 14:52:28 +02:00
uapi dma-buf/sync_file: Fix docs syntax 2023-09-13 09:48:29 +02:00
ufs scsi: ufs: Fix residual handling 2023-09-13 09:48:27 +02:00
vdso
video
xen