Skip to contentSkip to conversation

ASoC: Intel: mrfld- add ACPI module

DISCUSSION Dan Carpenter 2 participants 3 messages Nov 24, 2014 – Mar 18, 2015

lore
Share & tools
lore
#0 lore raw

Hello Vinod Koul,

The patch 336cfbb05edf: "ASoC: Intel: mrfld- add ACPI module" from Nov 11, 2014, leads to the following static checker warning:

	sound/soc/intel/sst/sst_acpi.c:313 sst_acpi_probe()
	info: ignoring unreachable code.

sound/soc/intel/sst/sst_acpi.c
304 ret = sst_context_init(ctx);
305 if (ret < 0)
306 return ret;
307
308 /* need to save shim registers in BYT */
309 ctx->shim_regs64 = devm_kzalloc(ctx->dev, sizeof(*ctx->shim_regs64),
310 GFP_KERNEL);
311 if (!ctx->shim_regs64) {

   312                  return -ENOMEM;
                        ^^^^^^^^^^^^^^^
   313                  goto do_sst_cleanup;
                        ^^^^^^^^^^^^^^^^^^^^
   314          }
   315  
   316          sst_configure_runtime_pm(ctx);
   317          platform_set_drvdata(pdev, ctx);
   318          return ret;
   319  
   320  do_sst_cleanup:
   321          sst_context_cleanup(ctx);
   322          platform_set_drvdata(pdev, NULL);
   323          dev_err(ctx->dev, "failed with %d\n", ret);
   324          return ret;

325 }

regards,
dan carpenter

#1 lore raw

Ping?

regards,
dan carpenter

Quoted 36 lines · Dan Carpenter

Hello Vinod Koul,

The patch 336cfbb05edf: "ASoC: Intel: mrfld- add ACPI module" from Nov 11, 2014, leads to the following static checker warning:

	sound/soc/intel/sst/sst_acpi.c:313 sst_acpi_probe()
	info: ignoring unreachable code.

sound/soc/intel/sst/sst_acpi.c

   304          ret = sst_context_init(ctx);
   305          if (ret < 0)
   306                  return ret;
   307  
   308          /* need to save shim registers in BYT */
   309          ctx->shim_regs64 = devm_kzalloc(ctx->dev, sizeof(*ctx->shim_regs64),
   310                                          GFP_KERNEL);
   311          if (!ctx->shim_regs64) {
   312                  return -ENOMEM;
                        ^^^^^^^^^^^^^^^
   313                  goto do_sst_cleanup;
                        ^^^^^^^^^^^^^^^^^^^^
   314          }
   315  
   316          sst_configure_runtime_pm(ctx);
   317          platform_set_drvdata(pdev, ctx);
   318          return ret;
   319  
   320  do_sst_cleanup:
   321          sst_context_cleanup(ctx);
   322          platform_set_drvdata(pdev, NULL);
   323          dev_err(ctx->dev, "failed with %d\n", ret);
   324          return ret;
   325  }

regards,
dan carpenter

#2 lore raw
Quoted 1 line · Dan Carpenter

Ping?

Sory dan, this seems to have slipped thru, I will send the patch for this.

Thanks a bunch for reporting

Signature · 1 line
~Vinod
Quoted 41 lines

regards,
dan carpenter

Quoted 36 lines · Dan Carpenter

Hello Vinod Koul,

The patch 336cfbb05edf: "ASoC: Intel: mrfld- add ACPI module" from Nov 11, 2014, leads to the following static checker warning:

	sound/soc/intel/sst/sst_acpi.c:313 sst_acpi_probe()
	info: ignoring unreachable code.

sound/soc/intel/sst/sst_acpi.c

   304          ret = sst_context_init(ctx);
   305          if (ret < 0)
   306                  return ret;
   307  
   308          /* need to save shim registers in BYT */
   309          ctx->shim_regs64 = devm_kzalloc(ctx->dev, sizeof(*ctx->shim_regs64),
   310                                          GFP_KERNEL);
   311          if (!ctx->shim_regs64) {
   312                  return -ENOMEM;
                        ^^^^^^^^^^^^^^^
   313                  goto do_sst_cleanup;
                        ^^^^^^^^^^^^^^^^^^^^
   314          }
   315  
   316          sst_configure_runtime_pm(ctx);
   317          platform_set_drvdata(pdev, ctx);
   318          return ret;
   319  
   320  do_sst_cleanup:
   321          sst_context_cleanup(ctx);
   322          platform_set_drvdata(pdev, NULL);
   323          dev_err(ctx->dev, "failed with %d\n", ret);
   324          return ret;
   325  }

regards,
dan carpenter