Patch "pinctl: ti: iodelay: fix error checking on pinctrl_count_index_with_args call" has been added to the 4.19-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

    pinctl: ti: iodelay: fix error checking on pinctrl_count_index_with_args call

to the 4.19-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:
     pinctl-ti-iodelay-fix-error-checking-on-pinctrl_count_index_with_args-call.patch
and it can be found in the queue-4.19 subdirectory.

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


>From 5ff8aca906f3a7a7db79fad92f2a4401107ef50d Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Date: Fri, 20 Sep 2019 14:20:30 +0200
Subject: pinctl: ti: iodelay: fix error checking on pinctrl_count_index_with_args call

From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

commit 5ff8aca906f3a7a7db79fad92f2a4401107ef50d upstream.

The call to pinctrl_count_index_with_args checks for a -EINVAL return
however this function calls pinctrl_get_list_and_count and this can
return -ENOENT. Rather than check for a specific error, fix this by
checking for any error return to catch the -ENOENT case.

Addresses-Coverity: ("Improper use of negative")
Fixes: 003910ebc83b ("pinctrl: Introduce TI IOdelay configuration driver")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20190920122030.14340-1-colin.king@xxxxxxxxxxxxx
Acked-by: Tony Lindgren <tony@xxxxxxxxxxx>
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/pinctrl/ti/pinctrl-ti-iodelay.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
+++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
@@ -496,7 +496,7 @@ static int ti_iodelay_dt_node_to_map(str
 		return -EINVAL;
 
 	rows = pinctrl_count_index_with_args(np, name);
-	if (rows == -EINVAL)
+	if (rows < 0)
 		return rows;
 
 	*map = devm_kzalloc(iod->dev, sizeof(**map), GFP_KERNEL);


Patches currently in stable-queue which might be from colin.king@xxxxxxxxxxxxx are

queue-4.19/pinctl-ti-iodelay-fix-error-checking-on-pinctrl_count_index_with_args-call.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