Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932825AbbHHJZA (ORCPT ); Sat, 8 Aug 2015 05:25:00 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:33031 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932432AbbHHJY7 (ORCPT ); Sat, 8 Aug 2015 05:24:59 -0400 From: Tomer Barletz To: gregkh@linuxfoundation.org, jslaby@suse.com Cc: linux-kernel@vger.kernel.org, Tomer Barletz Subject: [PATCH] tty: Fix potentialy used uninitialized variable Date: Sat, 8 Aug 2015 02:24:23 -0700 Message-Id: <1439025863-28481-1-git-send-email-barletz@gmail.com> X-Mailer: git-send-email 2.4.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 937 Lines: 29 Initialize size to 0, as it may be used uninitialized in case read_mem32() fails. Signed-off-by: Tomer Barletz --- drivers/tty/nozomi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index 80f9de9..d70e9e4 100644 --- a/drivers/tty/nozomi.c +++ b/drivers/tty/nozomi.c @@ -816,7 +816,7 @@ static int send_data(enum port_type index, struct nozomi *dc) static int receive_data(enum port_type index, struct nozomi *dc) { u8 buf[RECEIVE_BUF_MAX] = { 0 }; - int size; + int size = 0; u32 offset = 4; struct port *port = &dc->port[index]; void __iomem *addr = port->dl_addr[port->toggle_dl]; -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/