From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Hurley Subject: [PATCH 3/4] tty: Document required behavior of tty driver close() Date: Wed, 30 Jan 2013 12:43:51 -0500 Message-ID: <1359567832-25318-4-git-send-email-peter@hurleysoftware.com> References: <1359567832-25318-1-git-send-email-peter@hurleysoftware.com> Return-path: Received: from mailout39.mail01.mtsvc.net ([216.70.64.83]:33595 "EHLO n12.mail01.mtsvc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756075Ab3A3RqX (ORCPT ); Wed, 30 Jan 2013 12:46:23 -0500 In-Reply-To: <1359567832-25318-1-git-send-email-peter@hurleysoftware.com> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Ilya Zykov , Greg Kroah-Hartman Cc: Alan Cox , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Peter Hurley If the tty driver open() fails, the tty driver close() is still called during the resultant tty release. Signed-off-by: Peter Hurley --- include/linux/tty_driver.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index dd976cf..756a609 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -40,6 +40,7 @@ * void (*close)(struct tty_struct * tty, struct file * filp); * * This routine is called when a particular tty device is closed. + * Note: called even if the corresponding open() failed. * * Required method. * -- 1.8.1.1