From e8dd273d199f5bbe295a8e3d8b777c5505b6b2e1 Mon Sep 17 00:00:00 2001 From: Salah Triki Date: Thu, 17 Sep 2026 14:00:52 +0100 Subject: iio: proximity: isl29501: Fix return type of isl29501_register_write isl29501_register_write() was returning a u32 instead of an int. Since the function returns negative error codes (such as -ERANGE or return values from i2c_smbus_write_byte_data()), returning an unsigned integer type prevents callers from correctly checking for negative error conditions. Fix this by changing the function return type from u32 to int. This was found through manual code review. Fixes: 1c28799257bc ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.") Signed-off-by: Salah Triki Reviewed-by: Joshua Crofts Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron --- scripts/mod/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 scripts/mod/Makefile (limited to 'scripts/mod/Makefile') diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile new file mode 100644 index 000000000..c729bc936 --- /dev/null +++ b/scripts/mod/Makefile @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: GPL-2.0 +CFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO) + +hostprogs-always-y += modpost mk_elfconfig +always-y += empty.o + +modpost-objs := modpost.o file2alias.o sumversion.o symsearch.o + +devicetable-offsets-file := devicetable-offsets.h + +$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE + $(call filechk,offsets,__DEVICETABLE_OFFSETS_H__) + +targets += $(devicetable-offsets-file) devicetable-offsets.s + +# dependencies on generated files need to be listed explicitly + +$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o $(obj)/symsearch.o: $(obj)/elfconfig.h +$(obj)/file2alias.o: $(obj)/$(devicetable-offsets-file) + +quiet_cmd_elfconfig = MKELF $@ + cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@ + +$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE + $(call if_changed,elfconfig) + +targets += elfconfig.h -- cgit v1.3.1