Skip to content

Commit 847178f

Browse files
Mani-Sadhasivammiquelraynal
authored andcommitted
mtd: rawnand: qcom: Remove superfluous initialization of "ret"
In all the cases, "ret" variable is assigned a value before returning it. So there is no need to explicitly initialize it with 0. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230805174146.57006-2-manivannan.sadhasivam@linaro.org
1 parent 3549fec commit 847178f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ check_for_erased_page(struct qcom_nand_host *host, u8 *data_buf,
15541554
struct mtd_info *mtd = nand_to_mtd(chip);
15551555
struct nand_ecc_ctrl *ecc = &chip->ecc;
15561556
u8 *cw_data_buf, *cw_oob_buf;
1557-
int cw, data_size, oob_size, ret = 0;
1557+
int cw, data_size, oob_size, ret;
15581558

15591559
if (!data_buf)
15601560
data_buf = nand_get_data_buf(chip);
@@ -2684,7 +2684,7 @@ static int qcom_read_status_exec(struct nand_chip *chip,
26842684
const struct nand_op_instr *instr = NULL;
26852685
unsigned int op_id = 0;
26862686
unsigned int len = 0;
2687-
int ret = 0, num_cw, i;
2687+
int ret, num_cw, i;
26882688
u32 flash_status;
26892689

26902690
host->status = NAND_STATUS_READY | NAND_STATUS_WP;
@@ -2747,7 +2747,7 @@ static int qcom_read_id_type_exec(struct nand_chip *chip, const struct nand_subo
27472747
const struct nand_op_instr *instr = NULL;
27482748
unsigned int op_id = 0;
27492749
unsigned int len = 0;
2750-
int ret = 0;
2750+
int ret;
27512751

27522752
qcom_parse_instructions(chip, subop, &q_op);
27532753

@@ -2795,7 +2795,7 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub
27952795
struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip);
27962796
struct qcom_nand_host *host = to_qcom_nand_host(chip);
27972797
struct qcom_op q_op = {};
2798-
int ret = 0;
2798+
int ret;
27992799

28002800
qcom_parse_instructions(chip, subop, &q_op);
28012801

@@ -2841,7 +2841,7 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_
28412841
const struct nand_op_instr *instr = NULL;
28422842
unsigned int op_id = 0;
28432843
unsigned int len = 0;
2844-
int ret = 0;
2844+
int ret;
28452845

28462846
qcom_parse_instructions(chip, subop, &q_op);
28472847

@@ -2935,7 +2935,7 @@ static int qcom_erase_cmd_type_exec(struct nand_chip *chip, const struct nand_su
29352935
struct qcom_nand_host *host = to_qcom_nand_host(chip);
29362936
struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip);
29372937
struct qcom_op q_op = {};
2938-
int ret = 0;
2938+
int ret;
29392939

29402940
qcom_parse_instructions(chip, subop, &q_op);
29412941

0 commit comments

Comments
 (0)