diff options
author | Joe Perches | 2013-02-11 18:41:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-02-11 19:10:33 +0100 |
commit | 78110bb8dc4a7ff331bfa3cfe7d4e287cfb3f22b (patch) | |
tree | 6534f66eb765163602ad1af98c651bea6ae09416 /drivers/staging/iio | |
parent | Merge tag 'iio-for-3.9d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic... (diff) | |
download | kernel-qcow2-linux-78110bb8dc4a7ff331bfa3cfe7d4e287cfb3f22b.tar.gz kernel-qcow2-linux-78110bb8dc4a7ff331bfa3cfe7d4e287cfb3f22b.tar.xz kernel-qcow2-linux-78110bb8dc4a7ff331bfa3cfe7d4e287cfb3f22b.zip |
staging: Remove unnecessary OOM messages
alloc failures already get standardized OOM
messages and a dump_stack.
For the affected mallocs around these OOM messages:
Converted kzallocs with multiplies to kcalloc.
Converted kmallocs with multiplies to kmalloc_array.
Converted a kmalloc/strlen/strncpy to kstrdup.
Moved a spin_lock below a removed OOM message and
removed a now unnecessary spin_unlock.
Neatened alignment and whitespace.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_ring.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 6861877c3914..e676403ea3ea 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -140,11 +140,8 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p) char *data; data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL); - if (data == NULL) { - dev_err(indio_dev->dev.parent, - "memory alloc failed in buffer bh"); + if (data == NULL) goto done; - } if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength)) len = lis3l02dq_get_buffer_element(indio_dev, data); |