aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0383-driver-char-rpivid-Clean-up-error-handling-use-of-ER.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-02-18 18:04:33 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-02-18 23:42:32 +0100
commitf07e572f6447465d8938679533d604e402b0f066 (patch)
treecb333bd2a67e59e7c07659514850a0fd55fc825e /target/linux/bcm27xx/patches-5.4/950-0383-driver-char-rpivid-Clean-up-error-handling-use-of-ER.patch
parent5d3a6fd970619dfc55f8259035c3027d7613a2a6 (diff)
downloadupstream-f07e572f6447465d8938679533d604e402b0f066.tar.gz
upstream-f07e572f6447465d8938679533d604e402b0f066.tar.bz2
upstream-f07e572f6447465d8938679533d604e402b0f066.zip
bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G bcm2710: boot tested on RPi 3B v1.2 bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0383-driver-char-rpivid-Clean-up-error-handling-use-of-ER.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.4/950-0383-driver-char-rpivid-Clean-up-error-handling-use-of-ER.patch62
1 files changed, 0 insertions, 62 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0383-driver-char-rpivid-Clean-up-error-handling-use-of-ER.patch b/target/linux/bcm27xx/patches-5.4/950-0383-driver-char-rpivid-Clean-up-error-handling-use-of-ER.patch
deleted file mode 100644
index b61e2c5cfe..0000000000
--- a/target/linux/bcm27xx/patches-5.4/950-0383-driver-char-rpivid-Clean-up-error-handling-use-of-ER.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 8b95d0d18fcfb940fb0d171663ce5c93b8fb0024 Mon Sep 17 00:00:00 2001
-From: Dave Stevenson <dave.stevenson@raspberrypi.com>
-Date: Tue, 21 Jan 2020 16:24:45 +0000
-Subject: [PATCH] driver: char: rpivid: Clean up error handling use of
- ERR_PTR/IS_ERR
-
-The driver used an unnecessary intermediate void* variable so it
-only called ERR_PTR once to convert to the error value.
-
-Switch to converting as the error arises to remove these intermediate
-variables.
-
-Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
----
- drivers/char/broadcom/rpivid-mem.c | 17 +++++++----------
- 1 file changed, 7 insertions(+), 10 deletions(-)
-
---- a/drivers/char/broadcom/rpivid-mem.c
-+++ b/drivers/char/broadcom/rpivid-mem.c
-@@ -130,10 +130,8 @@ static const struct of_device_id rpivid_
- static int rpivid_mem_probe(struct platform_device *pdev)
- {
- int err;
-- void *ptr_err;
- const struct of_device_id *id;
- struct device *dev = &pdev->dev;
-- struct device *rpivid_mem_dev;
- struct resource *ioresource;
- struct rpivid_mem_priv *priv;
-
-@@ -183,16 +181,16 @@ static int rpivid_mem_probe(struct platf
- /* Create sysfs entries */
-
- priv->class = class_create(THIS_MODULE, priv->name);
-- ptr_err = priv->class;
-- if (IS_ERR(ptr_err))
-+ if (IS_ERR(priv->class)) {
-+ err = PTR_ERR(priv->class);
- goto failed_class_create;
-+ }
-
-- rpivid_mem_dev = device_create(priv->class, NULL,
-- priv->devid, NULL,
-- priv->name);
-- ptr_err = rpivid_mem_dev;
-- if (IS_ERR(ptr_err))
-+ dev = device_create(priv->class, NULL, priv->devid, NULL, priv->name);
-+ if (IS_ERR(dev)) {
-+ err = PTR_ERR(dev);
- goto failed_device_create;
-+ }
-
- /* Legacy alias */
- {
-@@ -217,7 +215,6 @@ failed_device_create:
- class_destroy(priv->class);
- failed_class_create:
- cdev_del(&priv->rpivid_mem_cdev);
-- err = PTR_ERR(ptr_err);
- failed_cdev_add:
- unregister_chrdev_region(priv->devid, 1);
- failed_alloc_chrdev: