staging: nvec: Return error in PS2 driver if write fails
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>
This commit is contained in:
parent
210ceb4f68
commit
ff006d1266
drivers/staging/nvec
|
@ -38,8 +38,7 @@ static struct nvec_ps2 ps2_dev;
|
||||||
static int ps2_startstreaming(struct serio *ser_dev)
|
static int ps2_startstreaming(struct serio *ser_dev)
|
||||||
{
|
{
|
||||||
unsigned char buf[] = START_STREAMING;
|
unsigned char buf[] = START_STREAMING;
|
||||||
nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
|
return nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ps2_stopstreaming(struct serio *ser_dev)
|
static void ps2_stopstreaming(struct serio *ser_dev)
|
||||||
|
@ -55,9 +54,7 @@ static int ps2_sendcommand(struct serio *ser_dev, unsigned char cmd)
|
||||||
buf[2] = cmd & 0xff;
|
buf[2] = cmd & 0xff;
|
||||||
|
|
||||||
dev_dbg(&ser_dev->dev, "Sending ps2 cmd %02x\n", cmd);
|
dev_dbg(&ser_dev->dev, "Sending ps2 cmd %02x\n", cmd);
|
||||||
nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
|
return nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nvec_ps2_notifier(struct notifier_block *nb,
|
static int nvec_ps2_notifier(struct notifier_block *nb,
|
||||||
|
|
Loading…
Reference in New Issue