net/funeth: simplify the return expression of fun_dl_info_get()
authorMinghao Chi <chi.minghao@zte.com.cn>
Fri, 29 Apr 2022 09:01:04 +0000 (09:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Apr 2022 12:56:02 +0000 (13:56 +0100)
Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/fungible/funeth/funeth_devlink.c

index a849b3c6b01f367c4e601de9f7e585b6c7f940ca..d50c222948b47f997cfd325e35a730b0d11b1cc9 100644 (file)
@@ -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 = {