Commit 0b5aff00 authored by Sachin Kamat's avatar Sachin Kamat Committed by Greg Kroah-Hartman

staging: dgap: dgap_fep5: Remove braces around return

Braces are not needed around return values.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 565c5095
...@@ -134,7 +134,7 @@ int dgap_after_config_loaded(void) ...@@ -134,7 +134,7 @@ int dgap_after_config_loaded(void)
dgap_Board[i]->flipflagbuf = dgap_driver_kzmalloc(MYFLIPLEN, GFP_ATOMIC); dgap_Board[i]->flipflagbuf = dgap_driver_kzmalloc(MYFLIPLEN, GFP_ATOMIC);
} }
return (rc); return rc;
} }
...@@ -150,14 +150,14 @@ static int dgap_usertoboard(struct board_t *brd, char *to_addr, char __user *fro ...@@ -150,14 +150,14 @@ static int dgap_usertoboard(struct board_t *brd, char *to_addr, char __user *fro
int n = U2BSIZE; int n = U2BSIZE;
if (!brd || brd->magic != DGAP_BOARD_MAGIC) if (!brd || brd->magic != DGAP_BOARD_MAGIC)
return(-EFAULT); return -EFAULT;
while (len) { while (len) {
if (n > len) if (n > len)
n = len; n = len;
if (copy_from_user((char *) &buf, from_addr, n) == -1 ) { if (copy_from_user((char *) &buf, from_addr, n) == -1 ) {
return(-EFAULT); return -EFAULT;
} }
/* Copy data from buffer to card memory */ /* Copy data from buffer to card memory */
...@@ -169,7 +169,7 @@ static int dgap_usertoboard(struct board_t *brd, char *to_addr, char __user *fro ...@@ -169,7 +169,7 @@ static int dgap_usertoboard(struct board_t *brd, char *to_addr, char __user *fro
from_addr += n; from_addr += n;
n = U2BSIZE; n = U2BSIZE;
} }
return(0); return 0;
} }
...@@ -1155,20 +1155,20 @@ uint dgap_get_custom_baud(struct channel_t *ch) ...@@ -1155,20 +1155,20 @@ uint dgap_get_custom_baud(struct channel_t *ch)
uint value = 0; uint value = 0;
if (!ch || ch->magic != DGAP_CHANNEL_MAGIC) { if (!ch || ch->magic != DGAP_CHANNEL_MAGIC) {
return (0); return 0;
} }
if (!ch->ch_bd || ch->ch_bd->magic != DGAP_BOARD_MAGIC) { if (!ch->ch_bd || ch->ch_bd->magic != DGAP_BOARD_MAGIC) {
return (0); return 0;
} }
if (!(ch->ch_bd->bd_flags & BD_FEP5PLUS)) if (!(ch->ch_bd->bd_flags & BD_FEP5PLUS))
return (0); return 0;
vaddr = ch->ch_bd->re_map_membase; vaddr = ch->ch_bd->re_map_membase;
if (!vaddr) if (!vaddr)
return (0); return 0;
/* /*
* Go get from fep mem, what the fep * Go get from fep mem, what the fep
...@@ -1178,7 +1178,7 @@ uint dgap_get_custom_baud(struct channel_t *ch) ...@@ -1178,7 +1178,7 @@ uint dgap_get_custom_baud(struct channel_t *ch)
(ch->ch_portnum * 0x28) + LINE_SPEED)); (ch->ch_portnum * 0x28) + LINE_SPEED));
value = readw(vaddr + offset); value = readw(vaddr + offset);
return (value); return value;
} }
...@@ -1230,23 +1230,23 @@ int dgap_param(struct tty_struct *tty) ...@@ -1230,23 +1230,23 @@ int dgap_param(struct tty_struct *tty)
uchar hflow; uchar hflow;
if (!tty || tty->magic != TTY_MAGIC) if (!tty || tty->magic != TTY_MAGIC)
return (-ENXIO); return -ENXIO;
un = (struct un_t *) tty->driver_data; un = (struct un_t *) tty->driver_data;
if (!un || un->magic != DGAP_UNIT_MAGIC) if (!un || un->magic != DGAP_UNIT_MAGIC)
return (-ENXIO); return -ENXIO;
ch = un->un_ch; ch = un->un_ch;
if (!ch || ch->magic != DGAP_CHANNEL_MAGIC) if (!ch || ch->magic != DGAP_CHANNEL_MAGIC)
return (-ENXIO); return -ENXIO;
bd = ch->ch_bd; bd = ch->ch_bd;
if (!bd || bd->magic != DGAP_BOARD_MAGIC) if (!bd || bd->magic != DGAP_BOARD_MAGIC)
return (-ENXIO); return -ENXIO;
bs = ch->ch_bs; bs = ch->ch_bs;
if (bs == 0) if (bs == 0)
return (-ENXIO); return -ENXIO;
DPR_PARAM(("param start: tdev: %x cflags: %x oflags: %x iflags: %x\n", DPR_PARAM(("param start: tdev: %x cflags: %x oflags: %x iflags: %x\n",
ch->ch_tun.un_dev, ch->ch_c_cflag, ch->ch_c_oflag, ch->ch_c_iflag)); ch->ch_tun.un_dev, ch->ch_c_cflag, ch->ch_c_oflag, ch->ch_c_iflag));
...@@ -1553,7 +1553,7 @@ int dgap_param(struct tty_struct *tty) ...@@ -1553,7 +1553,7 @@ int dgap_param(struct tty_struct *tty)
DPR_PARAM(("param finish\n")); DPR_PARAM(("param finish\n"));
return (0); return 0;
} }
...@@ -1670,7 +1670,7 @@ static int dgap_event(struct board_t *bd) ...@@ -1670,7 +1670,7 @@ static int dgap_event(struct board_t *bd)
int b1; int b1;
if (!bd || bd->magic != DGAP_BOARD_MAGIC) if (!bd || bd->magic != DGAP_BOARD_MAGIC)
return (-ENXIO); return -ENXIO;
DGAP_LOCK(bd->bd_lock, lock_flags); DGAP_LOCK(bd->bd_lock, lock_flags);
...@@ -1678,7 +1678,7 @@ static int dgap_event(struct board_t *bd) ...@@ -1678,7 +1678,7 @@ static int dgap_event(struct board_t *bd)
if (!vaddr) { if (!vaddr) {
DGAP_UNLOCK(bd->bd_lock, lock_flags); DGAP_UNLOCK(bd->bd_lock, lock_flags);
return (-ENXIO); return -ENXIO;
} }
eaddr = (struct ev_t *) (vaddr + EVBUF); eaddr = (struct ev_t *) (vaddr + EVBUF);
...@@ -1696,7 +1696,7 @@ static int dgap_event(struct board_t *bd) ...@@ -1696,7 +1696,7 @@ static int dgap_event(struct board_t *bd)
DPR_EVENT(("should be calling xxfail %d\n", __LINE__)); DPR_EVENT(("should be calling xxfail %d\n", __LINE__));
/* Let go of board lock */ /* Let go of board lock */
DGAP_UNLOCK(bd->bd_lock, lock_flags); DGAP_UNLOCK(bd->bd_lock, lock_flags);
return (-ENXIO); return -ENXIO;
} }
/* /*
...@@ -1944,5 +1944,5 @@ static int dgap_event(struct board_t *bd) ...@@ -1944,5 +1944,5 @@ static int dgap_event(struct board_t *bd)
writew(tail, &(eaddr->ev_tail)); writew(tail, &(eaddr->ev_tail));
DGAP_UNLOCK(bd->bd_lock, lock_flags); DGAP_UNLOCK(bd->bd_lock, lock_flags);
return (0); return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment