mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 09:01:34 +00:00
cxl/pci: Remove inconsistent usage of dev_err_probe()
If dev_err_probe() is to be used it should at least be used consistently within the same function. It is also worth questioning whether every potential -ENOMEM needs an explicit error message. Remove the cxl_setup_fw_upload() error prints for what are rare / hardware-independent failures. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
08b8a8c054
commit
2627c995c1
@ -970,7 +970,6 @@ int cxl_memdev_setup_fw_upload(struct cxl_memdev_state *mds)
|
||||
struct cxl_dev_state *cxlds = &mds->cxlds;
|
||||
struct device *dev = &cxlds->cxlmd->dev;
|
||||
struct fw_upload *fwl;
|
||||
int rc;
|
||||
|
||||
if (!test_bit(CXL_MEM_COMMAND_ID_GET_FW_INFO, mds->enabled_cmds))
|
||||
return 0;
|
||||
@ -978,17 +977,9 @@ int cxl_memdev_setup_fw_upload(struct cxl_memdev_state *mds)
|
||||
fwl = firmware_upload_register(THIS_MODULE, dev, dev_name(dev),
|
||||
&cxl_memdev_fw_ops, mds);
|
||||
if (IS_ERR(fwl))
|
||||
return dev_err_probe(dev, PTR_ERR(fwl),
|
||||
"Failed to register firmware loader\n");
|
||||
return PTR_ERR(fwl);
|
||||
|
||||
rc = devm_add_action_or_reset(cxlds->dev, devm_cxl_remove_fw_upload,
|
||||
fwl);
|
||||
if (rc)
|
||||
dev_err(dev,
|
||||
"Failed to add firmware loader remove action: %d\n",
|
||||
rc);
|
||||
|
||||
return rc;
|
||||
return devm_add_action_or_reset(cxlds->dev, devm_cxl_remove_fw_upload, fwl);
|
||||
}
|
||||
EXPORT_SYMBOL_NS_GPL(cxl_memdev_setup_fw_upload, CXL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user