lkml.org 
[lkml]   [2022]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] net/funeth: simplify the return expression of fun_dl_info_get()
    Date
    From: Minghao Chi <chi.minghao@zte.com.cn>

    Simplify the return expression.

    Reported-by: Zeal Robot <zealci@zte.com.cn>
    Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
    ---
    drivers/net/ethernet/fungible/funeth/funeth_devlink.c | 8 +-------
    1 file changed, 1 insertion(+), 7 deletions(-)

    diff --git a/drivers/net/ethernet/fungible/funeth/funeth_devlink.c b/drivers/net/ethernet/fungible/funeth/funeth_devlink.c
    index a849b3c6b01f..d50c222948b4 100644
    --- a/drivers/net/ethernet/fungible/funeth/funeth_devlink.c
    +++ b/drivers/net/ethernet/fungible/funeth/funeth_devlink.c
    @@ -6,13 +6,7 @@
    static int fun_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
    struct netlink_ext_ack *extack)
    {
    - int err;
    -
    - err = devlink_info_driver_name_put(req, KBUILD_MODNAME);
    - if (err)
    - return err;
    -
    - return 0;
    + return devlink_info_driver_name_put(req, KBUILD_MODNAME);
    }

    static const struct devlink_ops fun_dl_ops = {
    --
    2.25.1

    \
     
     \ /
      Last update: 2022-04-29 11:02    [W:4.548 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site