Patch "clocksource/drivers/ep93xx: Fix error handling during probe" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    clocksource/drivers/ep93xx: Fix error handling during probe

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     clocksource-drivers-ep93xx-fix-error-handling-during-probe.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From c0c4579d79d0df841e825c68df450909a0032faf Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Tue, 12 Dec 2023 22:46:07 +0100
Subject: clocksource/drivers/ep93xx: Fix error handling during probe

From: Arnd Bergmann <arnd@xxxxxxxx>

commit c0c4579d79d0df841e825c68df450909a0032faf upstream.

When the interrupt property fails to be parsed, ep93xx_timer_of_init()
return code ends up uninitialized:

drivers/clocksource/timer-ep93xx.c:160:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (irq < 0) {
            ^~~~~~~
drivers/clocksource/timer-ep93xx.c:188:9: note: uninitialized use occurs here
        return ret;
               ^~~
drivers/clocksource/timer-ep93xx.c:160:2: note: remove the 'if' if its condition is always false
        if (irq < 0) {
        ^~~~~~~~~~~~~~

Simplify this portion to use the normal construct of just checking
whether a valid interrupt was returned. Note that irq_of_parse_and_map()
never returns a negative value and no other callers check for that either.

Fixes: c28ca80ba3b5 ("clocksource: ep93xx: Add driver for Cirrus Logic EP93xx")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20231212214616.193098-1-arnd@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/clocksource/timer-ep93xx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/clocksource/timer-ep93xx.c b/drivers/clocksource/timer-ep93xx.c
index bc0ca6e12334..6981ff3ac8a9 100644
--- a/drivers/clocksource/timer-ep93xx.c
+++ b/drivers/clocksource/timer-ep93xx.c
@@ -155,9 +155,8 @@ static int __init ep93xx_timer_of_init(struct device_node *np)
 	ep93xx_tcu = tcu;
 
 	irq = irq_of_parse_and_map(np, 0);
-	if (irq == 0)
-		irq = -EINVAL;
-	if (irq < 0) {
+	if (!irq) {
+		ret = -EINVAL;
 		pr_err("EP93XX Timer Can't parse IRQ %d", irq);
 		goto out_free;
 	}
-- 
2.43.0



Patches currently in stable-queue which might be from arnd@xxxxxxxx are

queue-6.7/asoc-fsl_rpmsg-update-kconfig-dependencies.patch
queue-6.7/fbdev-sm712fb-use-correct-initializer-macros-for-str.patch
queue-6.7/drm-msm-a6xx-add-qmp-dependency.patch
queue-6.7/drm-amd-display-avoid-stringop-overflow-warnings-for.patch
queue-6.7/wifi-libertas-stop-selecting-wext.patch
queue-6.7/csky-fix-arch_jump_label_transform_static-override.patch
queue-6.7/edac-thunderx-fix-possible-out-of-bounds-string-acce.patch
queue-6.7/media-i2c-mt9m114-use-fsleep-in-place-of-udelay.patch
queue-6.7/arm-davinci-always-select-config_cpu_arm926t.patch
queue-6.7/wifi-mt76-mt7996-fix-mt7996_mcu_all_sta_info_event-s.patch
queue-6.7/clocksource-drivers-ep93xx-fix-error-handling-during-probe.patch
queue-6.7/asm-generic-fix-32-bit-__generic_cmpxchg_local.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux