linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] caif_virtio: Remove redundant initialization of variable err
@ 2020-09-30  1:29 Jing Xiangfeng
  2020-10-02  1:46 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jing Xiangfeng @ 2020-09-30  1:29 UTC (permalink / raw)
  To: davem, kuba, luc.vanoostenryck; +Cc: netdev, linux-kernel, jingxiangfeng

After commit a8c7687bf216 ("caif_virtio: Check that vringh_config is not
null"), the variable err is being initialized with '-EINVAL' that is
meaningless. So remove it.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/net/caif/caif_virtio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index 80ea2e913c2b..47a6d62b7511 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -652,7 +652,7 @@ static int cfv_probe(struct virtio_device *vdev)
 	const char *cfv_netdev_name = "cfvrt";
 	struct net_device *netdev;
 	struct cfv_info *cfv;
-	int err = -EINVAL;
+	int err;
 
 	netdev = alloc_netdev(sizeof(struct cfv_info), cfv_netdev_name,
 			      NET_NAME_UNKNOWN, cfv_netdev_setup);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] caif_virtio: Remove redundant initialization of variable err
  2020-09-30  1:29 [PATCH] caif_virtio: Remove redundant initialization of variable err Jing Xiangfeng
@ 2020-10-02  1:46 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-10-02  1:46 UTC (permalink / raw)
  To: jingxiangfeng; +Cc: kuba, luc.vanoostenryck, netdev, linux-kernel

From: Jing Xiangfeng <jingxiangfeng@huawei.com>
Date: Wed, 30 Sep 2020 09:29:54 +0800

> After commit a8c7687bf216 ("caif_virtio: Check that vringh_config is not
> null"), the variable err is being initialized with '-EINVAL' that is
> meaningless. So remove it.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>

Applied to net-next.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-02  1:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30  1:29 [PATCH] caif_virtio: Remove redundant initialization of variable err Jing Xiangfeng
2020-10-02  1:46 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).