Loading drivers/mtd/devices/msm_qpic_nand.c +14 −2 Original line number Diff line number Diff line /* * Copyright (C) 2007 Google, Inc. * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1996,6 +1996,7 @@ static int msm_nand_read_partial_page(struct mtd_info *mtd, if (err < 0) { /* Clear previously set EUCLEAN / EBADMSG */ is_euclean = 0; is_ebadmsg = 0; ret_len = ops->retlen; break; } Loading Loading @@ -2035,6 +2036,7 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len, { int ret; int is_euclean = 0; int is_ebadmsg = 0; struct mtd_oob_ops ops; unsigned char *bounce_buf = NULL; Loading Loading @@ -2073,9 +2075,14 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len, is_euclean = 1; ret = 0; } if (ret == -EBADMSG) { is_ebadmsg = 1; ret = 0; } if (ret < 0) { /* Clear previously set EUCLEAN */ /* Clear previously set errors */ is_euclean = 0; is_ebadmsg = 0; break; } Loading Loading @@ -2115,6 +2122,11 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len, out: if (is_euclean == 1) ret = -EUCLEAN; /* Snub EUCLEAN if we also have EBADMSG */ if (is_ebadmsg == 1) ret = -EBADMSG; return ret; } Loading Loading
drivers/mtd/devices/msm_qpic_nand.c +14 −2 Original line number Diff line number Diff line /* * Copyright (C) 2007 Google, Inc. * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1996,6 +1996,7 @@ static int msm_nand_read_partial_page(struct mtd_info *mtd, if (err < 0) { /* Clear previously set EUCLEAN / EBADMSG */ is_euclean = 0; is_ebadmsg = 0; ret_len = ops->retlen; break; } Loading Loading @@ -2035,6 +2036,7 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len, { int ret; int is_euclean = 0; int is_ebadmsg = 0; struct mtd_oob_ops ops; unsigned char *bounce_buf = NULL; Loading Loading @@ -2073,9 +2075,14 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len, is_euclean = 1; ret = 0; } if (ret == -EBADMSG) { is_ebadmsg = 1; ret = 0; } if (ret < 0) { /* Clear previously set EUCLEAN */ /* Clear previously set errors */ is_euclean = 0; is_ebadmsg = 0; break; } Loading Loading @@ -2115,6 +2122,11 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len, out: if (is_euclean == 1) ret = -EUCLEAN; /* Snub EUCLEAN if we also have EBADMSG */ if (is_ebadmsg == 1) ret = -EBADMSG; return ret; } Loading