Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932535AbbLNVio (ORCPT ); Mon, 14 Dec 2015 16:38:44 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42452 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932303AbbLNVin (ORCPT ); Mon, 14 Dec 2015 16:38:43 -0500 Date: Mon, 14 Dec 2015 10:55:13 -0800 From: Greg Kroah-Hartman To: xinhui Cc: linux-kernel@vger.kernel.org, Jiri Slaby , dvyukov@google.com, yanmin_zhang@linux.intel.com Subject: Re: [PATCH] tty/n_gsm.c: fix false positive WARN_ON and do some codes improvement Message-ID: <20151214185513.GA19131@kroah.com> References: <5655990D.7090300@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5655990D.7090300@linux.vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 21 On Wed, Nov 25, 2015 at 07:18:37PM +0800, xinhui wrote: > From: xinhui > > If gsm driver fails to activate one mux, and this mux is not stored in > gsm_mux[], there would be a warning in gsm_cleanup_mux(). Actually this > is a legal case. So just do a simple check instead of WARN_ON. > > There is one filed gsm->num to store its index of gsm_mux[]. So use > gsm->num to remove itself from gsm_mux[] instead of the for-loop > traverse. > > Reported-by: Dmitry Vyukov > Fixes: 5a64096700dc ("tty/n_gsm.c: fix a memory leak in gsmld_open") > Signed-off-by: Pan Xinhui the signed-off-by name has to match your from: name :( -- 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/