lkml.org 
[lkml]   [2019]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()
    On Fri, Feb 15, 2019 at 05:02:02PM +0800, Hsin-Yi Wang wrote:
    > i2c_get_dma_safe_msg_buf() allocates space based on msg->len. If threshold is
    > 0 and msg->len is also 0, function makes zero-length allocation, which returns
    > a special ZERO_SIZE_PTR instead of a NULL pointer, and this will cause later
    > code to fail. Modify the threshold to > 0 so the function returns NULL pointer.
    >
    > Fixes: fc66b39fe36a ("i2c: mediatek: Use DMA safe buffers for i2c transactions")
    > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>

    Reworded commit message to "HW doesn't support 0 length" and applied to
    for-current, thanks!

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2019-03-09 10:42    [W:2.535 / U:0.712 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site