summaryrefslogtreecommitdiff
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2017-01-18 11:12:00 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-18 11:33:02 -0800
commit009af5fdb4fb65e73c5783bf2de64490fcd84910 (patch)
tree9a645e42fc6102d413c52b24fb873efbeb0b0f8c /drivers/input/serio
parent2057e15945a8b5d867c086371a5fb946fd8221da (diff)
Input: at32psif - drop unnecessary error messages and other changes
Error messages after memory allocation failures are unnecessary and can be dropped, given that they are emitted as dev_dbg() so nobody except person actively debugging the driver would see them. Also replace jump to return 'goto l; ... l: return e;' with 'return e;' Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/at32psif.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c
index 2e4ff5bac754..e420fd781d44 100644
--- a/drivers/input/serio/at32psif.c
+++ b/drivers/input/serio/at32psif.c
@@ -159,13 +159,12 @@ static int psif_open(struct serio *io)
retval = clk_enable(psif->pclk);
if (retval)
- goto out;
+ return retval;
psif_writel(psif, CR, PSIF_BIT(CR_TXEN) | PSIF_BIT(CR_RXEN));
psif_writel(psif, IER, PSIF_BIT(RXRDY));
psif->open = true;
-out:
return retval;
}
@@ -210,16 +209,12 @@ static int __init psif_probe(struct platform_device *pdev)
int ret;
psif = kzalloc(sizeof(struct psif), GFP_KERNEL);
- if (!psif) {
- dev_dbg(&pdev->dev, "out of memory\n");
- ret = -ENOMEM;
- goto out;
- }
+ if (!psif)
+ return -ENOMEM;
psif->pdev = pdev;
io = kzalloc(sizeof(struct serio), GFP_KERNEL);
if (!io) {
- dev_dbg(&pdev->dev, "out of memory\n");
ret = -ENOMEM;
goto out_free_psif;
}
@@ -297,7 +292,6 @@ out_free_io:
kfree(io);
out_free_psif:
kfree(psif);
-out:
return ret;
}