summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorJoe Perches2013-02-11 18:41:29 +0100
committerGreg Kroah-Hartman2013-02-11 19:10:33 +0100
commit78110bb8dc4a7ff331bfa3cfe7d4e287cfb3f22b (patch)
tree6534f66eb765163602ad1af98c651bea6ae09416 /drivers/staging/iio
parentMerge tag 'iio-for-3.9d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic... (diff)
downloadkernel-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.c5
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);