diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-06-08 11:59:37 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-06-08 21:23:21 +0200 |
commit | 3fc661a98c8046a27dcf45a63049ee6605ebd364 (patch) | |
tree | 0468b8f3c8d4aa13ecce333ab3ad84146263cbc4 /target/linux/brcm2708/patches-4.4/0299-clk-bcm2835-fix-check-of-error-code-returned-by-devm.patch | |
parent | c17f02d2f272c6d74b20c2df050437f761d013a6 (diff) | |
download | upstream-3fc661a98c8046a27dcf45a63049ee6605ebd364.tar.gz upstream-3fc661a98c8046a27dcf45a63049ee6605ebd364.tar.bz2 upstream-3fc661a98c8046a27dcf45a63049ee6605ebd364.zip |
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.4.y
Also alphabetically order sound-soc kernel packages.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0299-clk-bcm2835-fix-check-of-error-code-returned-by-devm.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.4/0299-clk-bcm2835-fix-check-of-error-code-returned-by-devm.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0299-clk-bcm2835-fix-check-of-error-code-returned-by-devm.patch b/target/linux/brcm2708/patches-4.4/0299-clk-bcm2835-fix-check-of-error-code-returned-by-devm.patch new file mode 100644 index 0000000000..25b26a9614 --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0299-clk-bcm2835-fix-check-of-error-code-returned-by-devm.patch @@ -0,0 +1,33 @@ +From f083d686ec57e2b856f12a52978b594d719cddfc Mon Sep 17 00:00:00 2001 +From: Vladimir Zapolskiy <vz@mleia.com> +Date: Sun, 6 Mar 2016 03:21:35 +0200 +Subject: [PATCH 299/381] clk: bcm2835: fix check of error code returned by + devm_ioremap_resource() + +The change fixes potential oops while accessing iomem on invalid +address, if devm_ioremap_resource() fails due to some reason. + +The devm_ioremap_resource() function returns ERR_PTR() and never +returns NULL, which makes useless a following check for NULL. + +Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> +Fixes: 5e63dcc74b30 ("clk: bcm2835: Add a driver for the auxiliary peripheral clock gates") +Reviewed-by: Eric Anholt <eric@anholt.net> +Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> +--- + drivers/clk/bcm/clk-bcm2835-aux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/clk/bcm/clk-bcm2835-aux.c ++++ b/drivers/clk/bcm/clk-bcm2835-aux.c +@@ -38,8 +38,8 @@ static int bcm2835_aux_clk_probe(struct + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + reg = devm_ioremap_resource(dev, res); +- if (!reg) +- return -ENODEV; ++ if (IS_ERR(reg)) ++ return PTR_ERR(reg); + + onecell = devm_kmalloc(dev, sizeof(*onecell), GFP_KERNEL); + if (!onecell) |