kernel: bump 6.1 to 6.1.36
[openwrt/openwrt.git] / target / linux / generic / backport-6.1 / 424-v6.4-0004-mtd-core-prepare-mtd_otp_nvmem_add-to-handle-EPROBE_.patch
index 2d89a5db1266ed853236182d5ac6ab54bb94b5e4..9ddda420ac3bbfa271db88c62ebb61083dfa1b43 100644 (file)
@@ -17,7 +17,7 @@ Link: https://lore.kernel.org/linux-mtd/20230308082021.870459-4-michael@walle.cc
 
 --- a/drivers/mtd/mtdcore.c
 +++ b/drivers/mtd/mtdcore.c
-@@ -960,8 +960,8 @@ static int mtd_otp_nvmem_add(struct mtd_
+@@ -953,8 +953,8 @@ static int mtd_otp_nvmem_add(struct mtd_
                        nvmem = mtd_otp_nvmem_register(mtd, "user-otp", size,
                                                       mtd_nvmem_user_otp_reg_read);
                        if (IS_ERR(nvmem)) {
@@ -28,7 +28,7 @@ Link: https://lore.kernel.org/linux-mtd/20230308082021.870459-4-michael@walle.cc
                        }
                        mtd->otp_user_nvmem = nvmem;
                }
-@@ -978,7 +978,6 @@ static int mtd_otp_nvmem_add(struct mtd_
+@@ -971,7 +971,6 @@ static int mtd_otp_nvmem_add(struct mtd_
                        nvmem = mtd_otp_nvmem_register(mtd, "factory-otp", size,
                                                       mtd_nvmem_fact_otp_reg_read);
                        if (IS_ERR(nvmem)) {
@@ -36,10 +36,10 @@ Link: https://lore.kernel.org/linux-mtd/20230308082021.870459-4-michael@walle.cc
                                err = PTR_ERR(nvmem);
                                goto err;
                        }
-@@ -991,7 +990,7 @@ static int mtd_otp_nvmem_add(struct mtd_
+@@ -983,7 +982,7 @@ static int mtd_otp_nvmem_add(struct mtd_
  err:
-       if (mtd->otp_user_nvmem)
-               nvmem_unregister(mtd->otp_user_nvmem);
+       nvmem_unregister(mtd->otp_user_nvmem);
 -      return err;
 +      return dev_err_probe(dev, err, "Failed to register OTP NVMEM device\n");
  }