From 5dbe96bdfc788707f9fd45be02044be820f82b55 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 2 Oct 2015 21:00:37 +0100 Subject: [PATCH] nc100: clean up devgfx changes --- Kernel/platform-nc100/devgfx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Kernel/platform-nc100/devgfx.c b/Kernel/platform-nc100/devgfx.c index a2bfc186..ac5b3bcf 100644 --- a/Kernel/platform-nc100/devgfx.c +++ b/Kernel/platform-nc100/devgfx.c @@ -38,9 +38,10 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr) uint16_t l; if (arg >> 8 != 0x03) return vt_ioctl(minor, arg, ptr); - if (arg == GFXIOC_GETINFO) - return uput(&ncdisplay, ptr, sizeof(ncdisplay)); + switch(arg) { + case GFXIOC_GETINFO: + return uput(&ncdisplay, ptr, sizeof(ncdisplay)); case GFXIOC_DRAW: /* Note: we assume we will not map the screen over the buffers */ tmp = (uint8_t *)tmpbuf(); @@ -60,8 +61,8 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr) return -1; } bad: - udata.u_error = EINVAL; + udata.u_error = EINVAL; bad2: - brelse((bufptr) tmp); - return -1; + brelse((bufptr) tmp); + return -1; } -- 2.34.1