From 847178fe4ccdf7f70beddd91eb15481afee0a224 Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Sat, 5 Aug 2023 23:11:37 +0530 Subject: 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230805174146.57006-2-manivannan.sadhasivam@linaro.org --- drivers/mtd/nand/raw/qcom_nandc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/mtd') diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index dc8ca60fc2e2..4e0984b4341c 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -1554,7 +1554,7 @@ check_for_erased_page(struct qcom_nand_host *host, u8 *data_buf, struct mtd_info *mtd = nand_to_mtd(chip); struct nand_ecc_ctrl *ecc = &chip->ecc; u8 *cw_data_buf, *cw_oob_buf; - int cw, data_size, oob_size, ret = 0; + int cw, data_size, oob_size, ret; if (!data_buf) data_buf = nand_get_data_buf(chip); @@ -2684,7 +2684,7 @@ static int qcom_read_status_exec(struct nand_chip *chip, const struct nand_op_instr *instr = NULL; unsigned int op_id = 0; unsigned int len = 0; - int ret = 0, num_cw, i; + int ret, num_cw, i; u32 flash_status; 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 const struct nand_op_instr *instr = NULL; unsigned int op_id = 0; unsigned int len = 0; - int ret = 0; + int ret; qcom_parse_instructions(chip, subop, &q_op); @@ -2795,7 +2795,7 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip); struct qcom_nand_host *host = to_qcom_nand_host(chip); struct qcom_op q_op = {}; - int ret = 0; + int ret; qcom_parse_instructions(chip, subop, &q_op); @@ -2841,7 +2841,7 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_ const struct nand_op_instr *instr = NULL; unsigned int op_id = 0; unsigned int len = 0; - int ret = 0; + int ret; qcom_parse_instructions(chip, subop, &q_op); @@ -2935,7 +2935,7 @@ static int qcom_erase_cmd_type_exec(struct nand_chip *chip, const struct nand_su struct qcom_nand_host *host = to_qcom_nand_host(chip); struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip); struct qcom_op q_op = {}; - int ret = 0; + int ret; qcom_parse_instructions(chip, subop, &q_op); -- cgit v1.2.3