diff options
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-19 07:17:21 +0100 |
commit | 62b7f5931c54e96fca56dd8761b0e466d355c881 (patch) | |
tree | 1258b392752379833a075df006c2f6d7ac4be51d /target/linux/bcm27xx/patches-5.4/950-0383-driver-char-rpivid-Clean-up-error-handling-use-of-ER.patch | |
parent | 76d1168d0d4b9d76e2ad78c0fc6b255561deb284 (diff) | |
download | upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.tar.gz upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.tar.bz2 upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.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>
(cherry-picked from commit f07e572f64)
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.patch | 62 |
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: |