Skip to content

Commit

Permalink
hw: char: Remove unnecessary variable
Browse files Browse the repository at this point in the history
Compress lines and remove the variable.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
Shraddha Barke authored and Michael Tokarev committed Oct 8, 2015
1 parent bf5f78e commit 65cb2a1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hw/char/etraxfs_ser.c
Expand Up @@ -182,15 +182,13 @@ static void serial_receive(void *opaque, const uint8_t *buf, int size)
static int serial_can_receive(void *opaque)
{
ETRAXSerial *s = opaque;
int r;

/* Is the receiver enabled? */
if (!(s->regs[RW_REC_CTRL] & (1 << 3))) {
return 0;
}

r = sizeof(s->rx_fifo) - s->rx_fifo_len;
return r;
return sizeof(s->rx_fifo) - s->rx_fifo_len;
}

static void serial_event(void *opaque, int event)
Expand Down

0 comments on commit 65cb2a1

Please sign in to comment.