staging: nvec: Have nvec_write_async() return -ENOMEM on OOM
authorJulian Andres Klode <jak@jak-linux.org>
Tue, 27 Sep 2011 17:00:55 +0000 (19:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 30 Sep 2011 00:41:35 +0000 (17:41 -0700)
commit1b9bf629ea42fdacd951b9190f86b028557bbe19
treefa1dc52c588a7f910ec052583f4328f0cd517b32
parentff169c1487381aa522b92b9f0c87bd92577bfc80
staging: nvec: Have nvec_write_async() return -ENOMEM on OOM

Change nvec_write_async() to return an integer, 0 by default,
a negative error on failure. Change nvec_write_sync() to
check the return value and abort if it is negative.

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>
drivers/staging/nvec/nvec.c
drivers/staging/nvec/nvec.h