summaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc/hvc_opal.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-11-05 22:44:08 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-23 20:31:08 +0100
commit7f30c19caf94b98a1f672376e85a6968d756c25e (patch)
tree5c8236630c57531a31bc5914e34301d979f6d802 /drivers/tty/hvc/hvc_opal.c
parentdt-bindings: serial: renesas,sci: Document RZ/Five SoC (diff)
downloadlinux-7f30c19caf94b98a1f672376e85a6968d756c25e.tar.xz
linux-7f30c19caf94b98a1f672376e85a6968d756c25e.zip
tty: hvc: Make hvc_remove() return no value
The function hvc_remove() returns zero unconditionally. Make it return void instead to make it obvious that the caller doesn't need to do any error handling. Accordingly drop the error handling from hvc_opal_remove(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Link: https://lore.kernel.org/r/20231105214406.3765906-5-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/hvc/hvc_opal.c')
-rw-r--r--drivers/tty/hvc/hvc_opal.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
index 992e199e0ea8..8995b253cf90 100644
--- a/drivers/tty/hvc/hvc_opal.c
+++ b/drivers/tty/hvc/hvc_opal.c
@@ -235,16 +235,15 @@ static int hvc_opal_probe(struct platform_device *dev)
static int hvc_opal_remove(struct platform_device *dev)
{
struct hvc_struct *hp = dev_get_drvdata(&dev->dev);
- int rc, termno;
+ int termno;
termno = hp->vtermno;
- rc = hvc_remove(hp);
- if (rc == 0) {
- if (hvc_opal_privs[termno] != &hvc_opal_boot_priv)
- kfree(hvc_opal_privs[termno]);
- hvc_opal_privs[termno] = NULL;
- }
- return rc;
+ hvc_remove(hp);
+ if (hvc_opal_privs[termno] != &hvc_opal_boot_priv)
+ kfree(hvc_opal_privs[termno]);
+ hvc_opal_privs[termno] = NULL;
+
+ return 0;
}
static struct platform_driver hvc_opal_driver = {