Skip to content

Commit

Permalink
staging: nvec: Return error in PS2 driver if write fails
Browse files Browse the repository at this point in the history
Return the return value of nvec_write_async() in the methods
returning an int.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Julian Andres Klode authored and Greg Kroah-Hartman committed Sep 30, 2011
1 parent 210ceb4 commit ff006d1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/staging/nvec/nvec_ps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ static struct nvec_ps2 ps2_dev;
static int ps2_startstreaming(struct serio *ser_dev)
{
unsigned char buf[] = START_STREAMING;
nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
return 0;
return nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
}

static void ps2_stopstreaming(struct serio *ser_dev)
Expand All @@ -55,9 +54,7 @@ static int ps2_sendcommand(struct serio *ser_dev, unsigned char cmd)
buf[2] = cmd & 0xff;

dev_dbg(&ser_dev->dev, "Sending ps2 cmd %02x\n", cmd);
nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));

return 0;
return nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
}

static int nvec_ps2_notifier(struct notifier_block *nb,
Expand Down

0 comments on commit ff006d1

Please sign in to comment.