Commit 961d289b authored by Qinglang Miao's avatar Qinglang Miao Committed by Greg Kroah-Hartman

ocxl: simplify the return expression of free_function_dev()

Simplify the return expression.
Acked-by: default avatarFrederic Barrat <fbarrat@linux.ibm.com>
Acked-by: default avatarAndrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Link: https://lore.kernel.org/r/20200921131047.92526-1-miaoqinglang@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4b53a3c7
...@@ -327,14 +327,9 @@ static void free_function_dev(struct device *dev) ...@@ -327,14 +327,9 @@ static void free_function_dev(struct device *dev)
static int set_function_device(struct ocxl_fn *fn, struct pci_dev *dev) static int set_function_device(struct ocxl_fn *fn, struct pci_dev *dev)
{ {
int rc;
fn->dev.parent = &dev->dev; fn->dev.parent = &dev->dev;
fn->dev.release = free_function_dev; fn->dev.release = free_function_dev;
rc = dev_set_name(&fn->dev, "ocxlfn.%s", dev_name(&dev->dev)); return dev_set_name(&fn->dev, "ocxlfn.%s", dev_name(&dev->dev));
if (rc)
return rc;
return 0;
} }
static int assign_function_actag(struct ocxl_fn *fn) static int assign_function_actag(struct ocxl_fn *fn)
......
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