From: Holger Brunck <holger.brunck@keymile.com>
To: netdev@vger.kernel.org
Cc: Holger Brunck <holger.brunck@keymile.com>,
Zhao Qiang <qiang.zhao@nxp.com>
Subject: [PATCH net-next 2/8] net/wan/fsl_ucc_hdlc: fix unitialized variable warnings
Date: Wed, 17 May 2017 17:24:33 +0200 [thread overview]
Message-ID: <20170517152439.8817-2-holger.brunck@keymile.com> (raw)
In-Reply-To: <20170517152439.8817-1-holger.brunck@keymile.com>
This fixes the following compiler warnings:
drivers/net/wan/fsl_ucc_hdlc.c: In function 'ucc_hdlc_poll':
warning: 'skb' may be used uninitialized in this function
[-Wmaybe-uninitialized]
skb->mac_header = skb->data - skb->head;
and
drivers/net/wan/fsl_ucc_hdlc.c: In function 'ucc_hdlc_probe':
drivers/net/wan/fsl_ucc_hdlc.c:1127:3: warning: 'utdm' may be used
uninitialized in this function [-Wmaybe-uninitialized]
kfree(utdm);
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Cc: Zhao Qiang <qiang.zhao@nxp.com>
---
drivers/net/wan/fsl_ucc_hdlc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 0ae10a58ffca..6ef6d719545d 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -440,7 +440,7 @@ static int hdlc_tx_done(struct ucc_hdlc_private *priv)
static int hdlc_rx_done(struct ucc_hdlc_private *priv, int rx_work_limit)
{
struct net_device *dev = priv->ndev;
- struct sk_buff *skb;
+ struct sk_buff *skb = NULL;
hdlc_device *hdlc = dev_to_hdlc(dev);
struct qe_bd *bd;
u16 bd_status;
@@ -968,7 +968,7 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
struct ucc_hdlc_private *uhdlc_priv = NULL;
struct ucc_tdm_info *ut_info;
- struct ucc_tdm *utdm;
+ struct ucc_tdm *utdm = NULL;
struct resource res;
struct net_device *dev;
hdlc_device *hdlc;
--
2.12.0.rc1
next prev parent reply other threads:[~2017-05-17 15:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 15:24 [PATCH net-next 1/8] net/wan/fsl_ucc_hdlc: cleanup debug traces Holger Brunck
2017-05-17 15:24 ` Holger Brunck [this message]
2017-05-18 14:29 ` [PATCH net-next 2/8] net/wan/fsl_ucc_hdlc: fix unitialized variable warnings David Miller
2017-05-17 15:24 ` [PATCH net-next 3/8] net/wan/fsl_ucc_hdlc: fix wrong indentation Holger Brunck
2017-05-18 14:29 ` David Miller
2017-05-17 15:24 ` [PATCH net-next 4/8] net/wan/fsl_ucc_hdlc: fix incorrect memory allocation Holger Brunck
2017-05-18 14:29 ` David Miller
2017-05-17 15:24 ` [PATCH net-next 5/8] net/wan/fsl_ucc_hdlc: call qe_setbrg only for loopback mode Holger Brunck
2017-05-18 14:29 ` David Miller
2017-05-17 15:24 ` [PATCH net-next 6/8] fsl/qe: add bit description for SYNL register for GUMR Holger Brunck
2017-05-18 14:29 ` David Miller
2017-05-17 15:24 ` [PATCH net-next 7/8] net/wan/fsl_ucc_hdlc: add hdlc-bus support Holger Brunck
2017-05-18 14:29 ` David Miller
2017-05-17 15:24 ` [PATCH net-next 8/8] powerpc/85xx/kmcent2: use hdlc busmode for UCC1 Holger Brunck
2017-05-18 14:29 ` David Miller
2017-05-18 14:29 ` [PATCH net-next 1/8] net/wan/fsl_ucc_hdlc: cleanup debug traces David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170517152439.8817-2-holger.brunck@keymile.com \
--to=holger.brunck@keymile.com \
--cc=netdev@vger.kernel.org \
--cc=qiang.zhao@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox