Commit 73b69c01 authored by Aditya Pakki's avatar Aditya Pakki Committed by Greg Kroah-Hartman

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: default avatarAditya Pakki <pakki001@umn.edu>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 75f3da89
...@@ -1665,7 +1665,10 @@ static int ms_copy_page(struct rtsx_chip *chip, u16 old_blk, u16 new_blk, ...@@ -1665,7 +1665,10 @@ static int ms_copy_page(struct rtsx_chip *chip, u16 old_blk, u16 new_blk,
return STATUS_FAIL; 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, retval = ms_set_rw_reg_addr(chip, OverwriteFlag,
MS_EXTRA_SIZE, SystemParm, 6); MS_EXTRA_SIZE, SystemParm, 6);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment