Re: [PATCH -next] ocxl: simplify the return expression of free_function_dev()

From: Frederic Barrat
Date: Mon Sep 21 2020 - 11:35:03 EST




Le 21/09/2020 à 15:10, Qinglang Miao a écrit :
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@xxxxxxxxxx>
---


Thanks!
Acked-by: Frederic Barrat <fbarrat@xxxxxxxxxxxxx>


drivers/misc/ocxl/core.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/misc/ocxl/core.c b/drivers/misc/ocxl/core.c
index b7a09b21a..aebfc53a2 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)