Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756910Ab2JRUv6 (ORCPT ); Thu, 18 Oct 2012 16:51:58 -0400 Received: from senator.holtmann.net ([87.106.208.187]:42540 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756299Ab2JRUv4 (ORCPT ); Thu, 18 Oct 2012 16:51:56 -0400 Message-ID: <1350593239.2026.13.camel@aeonflux> Subject: Re: [PATCH 08/21] TTY: hci_ldisc, remove invalid check in open From: Marcel Holtmann To: Jiri Slaby Cc: gregkh@linuxfoundation.org, alan@linux.intel.com, linux-kernel@vger.kernel.org, jirislaby@gmail.com, Gustavo Padovan , Johan Hedberg , linux-bluetooth@vger.kernel.org Date: Thu, 18 Oct 2012 13:47:19 -0700 In-Reply-To: <1350592007-9216-9-git-send-email-jslaby@suse.cz> References: <1350592007-9216-1-git-send-email-jslaby@suse.cz> <1350592007-9216-9-git-send-email-jslaby@suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4 (3.4.4-2.fc17) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1053 Lines: 32 Hi Jiri, > hci_ldisc's open checks if tty_struct->disc_data is set. And if so it > returns with an error. But nothing ensures disc_data to be NULL. And > since ld->ops->open shall be called only once, we do not need the > check at all. So remove it. > > Note that this is not an issue now, but n_tty will start using the > disc_data pointer and this invalid 'if' would trigger then rendering > TTYs over BT unusable. > > Signed-off-by: Jiri Slaby > Cc: Marcel Holtmann > Cc: Gustavo Padovan > Cc: Johan Hedberg > Cc: linux-bluetooth@vger.kernel.org > --- > drivers/bluetooth/hci_ldisc.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) Acked-by: Marcel Holtmann Regards Marcel -- 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/