aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/vidconsole-uclass.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-09-06 22:17:33 +0900
committerTom Rini <trini@konsulko.com>2016-09-23 17:53:45 -0400
commit720873bf428db0859ebbcf6b86ed510688b4e0b8 (patch)
treef94e2b2c6306c94cfad474827478ef1223b07d08 /drivers/video/vidconsole-uclass.c
parent24f5aec3646f2a22d8ff8e02c07d6c9a92a5092a (diff)
downloadu-boot-720873bf428db0859ebbcf6b86ed510688b4e0b8.zip
u-boot-720873bf428db0859ebbcf6b86ed510688b4e0b8.tar.gz
u-boot-720873bf428db0859ebbcf6b86ed510688b4e0b8.tar.bz2
video: squash lines for immediate return
For vidconsole_post_probe(), it is common coding style to let a probe method return the value of a register function. The others will become simple wrapper functions. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/video/vidconsole-uclass.c')
-rw-r--r--drivers/video/vidconsole-uclass.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index c8cc05e..e9a90b1 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -190,7 +190,6 @@ static int vidconsole_post_probe(struct udevice *dev)
{
struct vidconsole_priv *priv = dev_get_uclass_priv(dev);
struct stdio_dev *sdev = &priv->sdev;
- int ret;
if (!priv->tab_width_frac)
priv->tab_width_frac = VID_TO_POS(priv->x_charsize) * 8;
@@ -206,11 +205,8 @@ static int vidconsole_post_probe(struct udevice *dev)
sdev->putc = vidconsole_putc;
sdev->puts = vidconsole_puts;
sdev->priv = dev;
- ret = stdio_register(sdev);
- if (ret)
- return ret;
- return 0;
+ return stdio_register(sdev);
}
UCLASS_DRIVER(vidconsole) = {