Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8166526ybi; Thu, 6 Jun 2019 07:46:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjpwN1f3/VjJAPPcbOJJif6ssHS1YpWlW9uZ0/Da9jPKEMDL7b/pSFE8OPkS90VevCyjwe X-Received: by 2002:a62:ea0a:: with SMTP id t10mr53289374pfh.236.1559832404504; Thu, 06 Jun 2019 07:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559832404; cv=none; d=google.com; s=arc-20160816; b=oTdo1ERM4YtlxEQfxuft+rWVMeyNzu1WjcKNExpONutDlUqBBMDkq+B4eFt6seHzMr 8jcOu7WeFoNtDk4g8Y09lT0bAi0pn+mgjnAU+7GX2SMG5a5LG8tOElqY+HpcuQVGXGZK 5VILIflvm55l9Z4kqgXtWGG8a9IrZhGnOnZKbfJWPbYSOj3B/viecjKWBP0UVNNJ6t0l 9DcUXXSL/vDvld0DkATbzbAgr699xMexxh1OkXGoI45kjo9cLpPM9+UgAyixfzsmZb53 Cevk7v4RY4rg0i0fCPgoaIO6JwxMBPF/A38dNZe3tTqOTRYnalaZKy2N+51rA119jkX6 eZcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=/bvAEs/cU0mtUQOg/KjI1t7TyYYFSovFhdhjThd1Udg=; b=Copkx04Os/NLa+kDvr/HDW/phZ5+zbve8mFfnn0TfAJUfZwutyseeXYAqhwE1Uu6/T 4nMcj+CwV4gMpP2y+zbruqPHDYOF8BZ+3bgiV276Yl4UY2wBhunn5m2wUfS/0dQDlHOS Ogx+QteQVakB7v8EQiWQ4fpblu0NjsUCNPj08R6RmVVaahuEMWdQjt3eh+m7iL8hMaWN 6JJzBdcxs3jsP248juIOqo4+Q+aUiz5ZAQ9Xy4qoSnfk/WPj/cF4QLazjzxU9ccHZ63K oj2uG9OUy8fWOYTg0gEvFAZ0v9vklTpBGyuZLFlCN9F/Ci77X/jx6DAbpRXh1ikQTxvL rpZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si2263665pgj.40.2019.06.06.07.46.26; Thu, 06 Jun 2019 07:46:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728938AbfFFOnc (ORCPT + 99 others); Thu, 6 Jun 2019 10:43:32 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:45157 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727309AbfFFOnc (ORCPT ); Thu, 6 Jun 2019 10:43:32 -0400 Received: from orion.localdomain ([77.9.2.22]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MDgtl-1hRQpp30cB-00Aqgr; Thu, 06 Jun 2019 16:43:22 +0200 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org Subject: [PATCH] net: ipv4: fib_semantics: fix uninitialized variable Date: Thu, 6 Jun 2019 16:43:17 +0200 Message-Id: <1559832197-22758-1-git-send-email-info@metux.net> X-Mailer: git-send-email 1.9.1 X-Provags-ID: V03:K1:A8lM3KTrS7d9lFYFMMXKbOZdHpr6Pq+8VblZT4wy4ZwdFw4CJh1 IC3s8zx+P/5s5GBiK4YoBKBm2BMlc7qSZ37kw+TIovbxlKlz2CmwSq3dfo9e+VdvMBfyi1T C8gbQ+yw8jBTpvYtNKZqyD2hN3Ufxa8YZ4UvERmKF8g/85FIPZG5jgnKdDYzF3PRw0LFZx9 NIzS5uZQWDFowrQaH5MJg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:huYfGX0OWj0=:ov/76Vx0+ndbj2Xe8G4c3P aCQF12X8uaeSSXKUAQlu6iHZ0nNVRgJwwnKFM6eGe99+brL0TDhPzl3vKPKPhCYtqki6IXXIV aA9tTs1eXOCnxAOYR2c6wyeQRchSUPccmtz03tmeoZ5qocbRFS5chNTu+o7Cq8UeNrxn7Ry3L iN+mMi0zK+B0LxeE/2RMc1BE/WkfbfBmTP5OpHpTnwPIS2LjROefKD0JRAKxCi82HcFHMAN4m r729PYQQuntBX2PjfmbSX3Uy/YzCBiBdo0cT3EbIjUA11pdB1gRMZWV7Ns11tbTBai7YePwBa eLQiqmg5S/w+xJb+5dhQTVVx/uQv65h/FwhC+H0P4d7Bcs4v2X4ebS1vx9wHQjiSDZqLHVRN1 XW/6ytveu6AKwNsMvL+bPCj8lj4vCm8LM49YArT99PFlCkrX7qLVsx7aydRcF8plm3tlbbKd4 VWuRJhkT6vQLUBb3SALBkuBObP8kEkGh7hPp82ydl2Uz9p10ykbn9n1GSykb+0XrEY/GDPkAW ujUAjpwPf5/Qj8vdvBKZQS3iStiMB1cP+Kz+imreA6SOQGR1cBgsrMT5eVY/hICZMLZICYtR1 Xpc43wQbJmkV0ThVHKOXnUXXgDoFeZiZvJYDOzAvlGy9M81sZSRNv8r1ugjgu1Jyk93NBE4O5 nLbkeAY9P0HZqGNbIT0nnSFQIp/vsjcKewem7XNQTOXDM+qcVMg/m1+QQUOrjBt9EAjJLgg20 nidl62oSXwkdH0lH713NDo/7gGQhY8rCfoRz1w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Enrico Weigelt fix an uninitialized variable: CC net/ipv4/fib_semantics.o net/ipv4/fib_semantics.c: In function 'fib_check_nh_v4_gw': net/ipv4/fib_semantics.c:1027:12: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] if (!tbl || err) { ^~ Signed-off-by: Enrico Weigelt --- net/ipv4/fib_semantics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index b804106..bfa49a8 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -964,7 +964,7 @@ static int fib_check_nh_v4_gw(struct net *net, struct fib_nh *nh, u32 table, { struct net_device *dev; struct fib_result res; - int err; + int err = 0; if (nh->fib_nh_flags & RTNH_F_ONLINK) { unsigned int addr_type; -- 1.9.1