Skip to content

Commit 5784cfb

Browse files
Qinglang Miaoherbertx
authored andcommitted
crypto: marvell/octeontx - simplify the return expression of create_sysfs_eng_grps_info()
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent e356c49 commit 5784cfb

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -824,18 +824,12 @@ static ssize_t eng_grp_info_show(struct device *dev,
824824
static int create_sysfs_eng_grps_info(struct device *dev,
825825
struct otx_cpt_eng_grp_info *eng_grp)
826826
{
827-
int ret;
828-
829827
eng_grp->info_attr.show = eng_grp_info_show;
830828
eng_grp->info_attr.store = NULL;
831829
eng_grp->info_attr.attr.name = eng_grp->sysfs_info_name;
832830
eng_grp->info_attr.attr.mode = 0440;
833831
sysfs_attr_init(&eng_grp->info_attr.attr);
834-
ret = device_create_file(dev, &eng_grp->info_attr);
835-
if (ret)
836-
return ret;
837-
838-
return 0;
832+
return device_create_file(dev, &eng_grp->info_attr);
839833
}
840834

841835
static void ucode_unload(struct device *dev, struct otx_cpt_ucode *ucode)

0 commit comments

Comments
 (0)