diff options
author | Davidlohr Bueso <dave@gnu.org> | 2010-09-29 21:53:35 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-10-13 10:49:23 -0400 |
commit | 6792cbbb254712a8c0fa8a4c97c8d521c7c41c28 (patch) | |
tree | 3ab25c521042133a27f9875ad1d366e4b44ad68f /drivers/input/misc | |
parent | 7aed3fb73f4ac7912ce9e0c232a15ee012bf4be5 (diff) |
Input: return -ENOMEM in select drivers when memory allocation fails
Instead of using -1 let's start using proper error codes.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/powermate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index bf170f6b4422..f45947190e4f 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c | |||
@@ -280,7 +280,7 @@ static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_dev | |||
280 | 280 | ||
281 | pm->configcr = kmalloc(sizeof(*(pm->configcr)), GFP_KERNEL); | 281 | pm->configcr = kmalloc(sizeof(*(pm->configcr)), GFP_KERNEL); |
282 | if (!pm->configcr) | 282 | if (!pm->configcr) |
283 | return -1; | 283 | return -ENOMEM; |
284 | 284 | ||
285 | return 0; | 285 | return 0; |
286 | } | 286 | } |