diff mbox series

[-next] crypto: marvell/octeontx - simplify the return expression of create_sysfs_eng_grps_info()

Message ID 20200921131007.91145-1-miaoqinglang@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [-next] crypto: marvell/octeontx - simplify the return expression of create_sysfs_eng_grps_info() | expand

Commit Message

Qinglang Miao Sept. 21, 2020, 1:10 p.m. UTC
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Herbert Xu Oct. 2, 2020, 11:54 a.m. UTC | #1
On Mon, Sep 21, 2020 at 09:10:07PM +0800, Qinglang Miao wrote:
> Simplify the return expression.
> 
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
>  drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c b/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
index cc103b1bc..40b482198 100644
--- a/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
+++ b/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
@@ -824,18 +824,12 @@  static ssize_t eng_grp_info_show(struct device *dev,
 static int create_sysfs_eng_grps_info(struct device *dev,
 				      struct otx_cpt_eng_grp_info *eng_grp)
 {
-	int ret;
-
 	eng_grp->info_attr.show = eng_grp_info_show;
 	eng_grp->info_attr.store = NULL;
 	eng_grp->info_attr.attr.name = eng_grp->sysfs_info_name;
 	eng_grp->info_attr.attr.mode = 0440;
 	sysfs_attr_init(&eng_grp->info_attr.attr);
-	ret = device_create_file(dev, &eng_grp->info_attr);
-	if (ret)
-		return ret;
-
-	return 0;
+	return device_create_file(dev, &eng_grp->info_attr);
 }
 
 static void ucode_unload(struct device *dev, struct otx_cpt_ucode *ucode)