• B
    mtd: nand: r852: correct write_buf loop bounds · ab7f6fce
    Brian Norris 提交于
    The two loops in r852_write_buf() are designed to handle 4-byte-aligned
    and then 1-byte-aligned portions, respectively. However, there are two
    issues:
    
    (1) The first loop will only terminate if 'len' is a multiple of 4
    (2) The second loop will never terminate if it runs at least once
    
    Rewrite these loops as they were probably intended. Compile tested only.
    
    Issues pointed out by Coverity Scan.
    Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
    Cc: Maxim Levitsky <maximlevitsky@gmail.com>
    ab7f6fce
r852.c 24.8 KB