• L
    mmc: block: return errorcode from mmc_sd_num_wr_blocks() · 169f03a0
    Linus Walleij 提交于
    mmc_sd_num_wr_blocks() has an interesting construction that
    saves one return argument by casting (u32)-1 as error code
    if something goes wrong.
    
    This is however a bit confusing when the normal kernel
    pattern is to return an int error code on success.
    
    So instead pass a variable "blocks" that the function can
    fill in with the number of successfully transferred blocks
    and return an integer as error code.
    Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
    [Ulf: Changed a return code to -EIO, reported by Dan Carpenter and fixed
    by Linus Walleij]
    169f03a0
block.c 58.9 KB