Patch "of/fdt: declared return type does not match actual return type" has been added to the 5.18-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

    of/fdt: declared return type does not match actual return type

to the 5.18-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:
     of-fdt-declared-return-type-does-not-match-actual-re.patch
and it can be found in the queue-5.18 subdirectory.

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



commit 8879050f27300f0f7ec52a52c8417471d7e2df24
Author: Xu Qiang <xuqiang36@xxxxxxxxxx>
Date:   Mon Aug 1 12:05:06 2022 +0000

    of/fdt: declared return type does not match actual return type
    
    [ Upstream commit 7913145afa51bbed9eaf8e5b4ee55fa9884a71e5 ]
    
    The commit 649cab56de8e (“of: properly check for error returned
    by fdt_get_name()”) changed the return value type from bool to int,
    but forgot to change the return value simultaneously.
    
    populate_node was only called in unflatten_dt_nodes, and returns
    with values greater than or equal to 0 were discarded without further
    processing. Considering that return 0 usually indicates success,
    return 0 instead of return true.
    
    Fixes: 649cab56de8e (“of: properly check for error returned by fdt_get_name()”)
    Signed-off-by: Xu Qiang <xuqiang36@xxxxxxxxxx>
    Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220801120506.11461-2-xuqiang36@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 0f30496ce80b..d624e8b185aa 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -246,7 +246,7 @@ static int populate_node(const void *blob,
 	}
 
 	*pnp = np;
-	return true;
+	return 0;
 }
 
 static void reverse_nodes(struct device_node *parent)



[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