mirror of https://gitee.com/openkylin/linux.git
staging: rts5208: Add a check for ms_read_extra_data
In ms_copy_page, the function ms_read_extra_data may fail for many reasons. The fix adds a check similar to other invocation to return error upstream. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
75f3da8958
commit
73b69c01cc
|
@ -1665,7 +1665,10 @@ static int ms_copy_page(struct rtsx_chip *chip, u16 old_blk, u16 new_blk,
|
|||
return STATUS_FAIL;
|
||||
}
|
||||
|
||||
ms_read_extra_data(chip, old_blk, i, extra, MS_EXTRA_SIZE);
|
||||
retval = ms_read_extra_data(chip, old_blk, i, extra,
|
||||
MS_EXTRA_SIZE);
|
||||
if (retval != STATUS_SUCCESS)
|
||||
return STATUS_FAIL;
|
||||
|
||||
retval = ms_set_rw_reg_addr(chip, OverwriteFlag,
|
||||
MS_EXTRA_SIZE, SystemParm, 6);
|
||||
|
|
Loading…
Reference in New Issue