samba: fix some security problems
[openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0147-pinctrl-bcm2835-Fix-cut-and-paste-error-in-pull-pars.patch
1 From be4e718cccf6909072eeab1032b1d9fb6dd92b43 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 9 Feb 2016 09:52:13 +0000
4 Subject: [PATCH 147/170] pinctrl-bcm2835: Fix cut-and-paste error in "pull"
5  parsing
6
7 The DT bindings for pinctrl-bcm2835 allow both the function and pull
8 to contain either one entry or one per pin. However, an error in the
9 DT parsing can cause failures if the number of pulls differs from the
10 number of functions.
11 ---
12  drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +-
13  1 file changed, 1 insertion(+), 1 deletion(-)
14
15 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
16 +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
17 @@ -802,7 +802,7 @@ static int bcm2835_pctl_dt_node_to_map(s
18                 }
19                 if (num_pulls) {
20                         err = of_property_read_u32_index(np, "brcm,pull",
21 -                                       (num_funcs > 1) ? i : 0, &pull);
22 +                                       (num_pulls > 1) ? i : 0, &pull);
23                         if (err)
24                                 goto out;
25                         err = bcm2835_pctl_dt_node_to_map_pull(pc, np, pin,