summaryrefslogtreecommitdiff
path: root/drivers/iio/industrialio-event.c
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2012-05-12 00:17:17 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-14 15:54:23 (GMT)
commit484dd30e016eb425b0de871357fff2c9bb93be45 (patch)
treedfc864ddb6ac3b60ce038420747a79bca9aa6da1 /drivers/iio/industrialio-event.c
parent06f3d3bdee9bac871c556c34ea80303033c474b3 (diff)
downloadlinux-484dd30e016eb425b0de871357fff2c9bb93be45.tar.xz
persistent_ram: Fix buffer size clamping during writes
This is a longstanding bug, almost unnoticeable when calling persistent_ram_write() for small buffers. But when called for large data buffers, the write routine behaves incorrectly, as the size may never update: instead of clamping the size to the maximum buffer size, buffer_size_add_clamp() returns an error (which is never checked by the write routine, btw). To fix this, we now use buffer_size_add() that actually clamps the size to the max value. Also remove buffer_size_add_clamp(), it is no longer needed. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: Colin Cross <ccross@android.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/industrialio-event.c')
0 files changed, 0 insertions, 0 deletions