summaryrefslogtreecommitdiffstats
path: root/drivers/misc/ocxl
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-21 21:10:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-02 11:35:46 +0200
commit961d289b61eb7fd9839d0223a19a8ce544c69fdb (patch)
treeb3cf4afd01e207786afb14c3229bb226d34cccd1 /drivers/misc/ocxl
parent4b53a3c72116118d86fab4112277e1dc4edf273c (diff)
downloadlinux-stable-961d289b61eb7fd9839d0223a19a8ce544c69fdb.tar.gz
linux-stable-961d289b61eb7fd9839d0223a19a8ce544c69fdb.tar.bz2
linux-stable-961d289b61eb7fd9839d0223a19a8ce544c69fdb.zip
ocxl: simplify the return expression of free_function_dev()
Simplify the return expression. Acked-by: Frederic Barrat <fbarrat@linux.ibm.com> Acked-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Link: https://lore.kernel.org/r/20200921131047.92526-1-miaoqinglang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/ocxl')
-rw-r--r--drivers/misc/ocxl/core.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/misc/ocxl/core.c b/drivers/misc/ocxl/core.c
index b7a09b21ab36..aebfc53a2d09 100644
--- a/drivers/misc/ocxl/core.c
+++ b/drivers/misc/ocxl/core.c
@@ -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)
{
- int rc;
-
fn->dev.parent = &dev->dev;
fn->dev.release = free_function_dev;
- rc = dev_set_name(&fn->dev, "ocxlfn.%s", dev_name(&dev->dev));
- if (rc)
- return rc;
- return 0;
+ return dev_set_name(&fn->dev, "ocxlfn.%s", dev_name(&dev->dev));
}
static int assign_function_actag(struct ocxl_fn *fn)