Commit bf29ce87 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'fpga-for-6.2-final' of...

Merge tag 'fpga-for-6.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-linus

Xy writes:
   FPGA Manager changes for 6.2-final
   stratix10-soc:
     - Zheng's change fixes return value check
   Intel m10 bmc secure update:
     - Ilpo's change fixes probe rollback

   All patches have been reviewed on the mailing list, and have been in
   the last linux-next releases (as part of our for-6.2 branch)
Signed-off-by: default avatarXu Yilun <yilun.xu@intel.com>

* tag 'fpga-for-6.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga:
  fpga: m10bmc-sec: Fix probe rollback
  fpga: stratix10-soc: Fix return value check in s10_ops_write_init()
parents 1ca7fca3 60ce26d1
......@@ -574,20 +574,27 @@ static int m10bmc_sec_probe(struct platform_device *pdev)
len = scnprintf(buf, SEC_UPDATE_LEN_MAX, "secure-update%d",
sec->fw_name_id);
sec->fw_name = kmemdup_nul(buf, len, GFP_KERNEL);
if (!sec->fw_name)
return -ENOMEM;
if (!sec->fw_name) {
ret = -ENOMEM;
goto fw_name_fail;
}
fwl = firmware_upload_register(THIS_MODULE, sec->dev, sec->fw_name,
&m10bmc_ops, sec);
if (IS_ERR(fwl)) {
dev_err(sec->dev, "Firmware Upload driver failed to start\n");
kfree(sec->fw_name);
xa_erase(&fw_upload_xa, sec->fw_name_id);
return PTR_ERR(fwl);
ret = PTR_ERR(fwl);
goto fw_uploader_fail;
}
sec->fwl = fwl;
return 0;
fw_uploader_fail:
kfree(sec->fw_name);
fw_name_fail:
xa_erase(&fw_upload_xa, sec->fw_name_id);
return ret;
}
static int m10bmc_sec_remove(struct platform_device *pdev)
......
......@@ -213,9 +213,9 @@ static int s10_ops_write_init(struct fpga_manager *mgr,
/* Allocate buffers from the service layer's pool. */
for (i = 0; i < NUM_SVC_BUFS; i++) {
kbuf = stratix10_svc_allocate_memory(priv->chan, SVC_BUF_SIZE);
if (!kbuf) {
if (IS_ERR(kbuf)) {
s10_free_buffers(mgr);
ret = -ENOMEM;
ret = PTR_ERR(kbuf);
goto init_done;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment