Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1368026
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jisheng Zhang <jszhang@marvell.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] net: mvpp2: fix maybe-uninitialized warning |
| Date | Thu, 31 Mar 2016 11:10:02 +0200 |
| Message-ID | <riGM2-2Es-9@gated-at.bofh.it> (permalink) |
| X-Original-To | <davem@davemloft.net>, <mw@semihalf.com> |
| X-Mailer | git-send-email 2.8.0.rc3 |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| X-Proofpoint-Virus-Version | vendor=fsecure engine=2.50.10432:,, definitions=2016-03-31_03:,, signatures=0 |
| X-Proofpoint-Details | rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1601100000 definitions=main-1603310123 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 28 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, Jisheng Zhang <jszhang@marvell.com> |
| X-Original-Date | Thu, 31 Mar 2016 17:01:23 +0800 |
| X-Original-Message-ID | <1459414883-6295-1-git-send-email-jszhang@marvell.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1368026 |
Show key headers only | View raw
This is to fix the following maybe-uninitialized warning:
drivers/net/ethernet/marvell/mvpp2.c:6007:18: warning: 'err' may be
used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/net/ethernet/marvell/mvpp2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index c797971a..e9aa8d9 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -6059,8 +6059,10 @@ static int mvpp2_port_init(struct mvpp2_port *port)
/* Map physical Rx queue to port's logical Rx queue */
rxq = devm_kzalloc(dev, sizeof(*rxq), GFP_KERNEL);
- if (!rxq)
+ if (!rxq) {
+ err = -ENOMEM;
goto err_free_percpu;
+ }
/* Map this Rx queue to a physical queue */
rxq->id = port->first_rxq + queue;
rxq->port = port->id;
--
2.8.0.rc3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] net: mvpp2: fix maybe-uninitialized warning Jisheng Zhang <jszhang@marvell.com> - 2016-03-31 11:10 +0200 Re: [PATCH] net: mvpp2: fix maybe-uninitialized warning David Miller <davem@davemloft.net> - 2016-04-01 20:40 +0200
csiph-web