From: Qinglang Miao Date: Mon, 21 Sep 2020 13:10:07 +0000 (+0800) Subject: crypto: marvell/octeontx - simplify the return expression of create_sysfs_eng_grps_info() X-Git-Tag: v5.15~2545^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5784cfb201e61cdb31e6eeed7b258bca74afc1a5;p=platform%2Fkernel%2Flinux-starfive.git crypto: marvell/octeontx - simplify the return expression of create_sysfs_eng_grps_info() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c b/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c index cc103b1..40b4821 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)