Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2115475imm; Mon, 3 Sep 2018 19:49:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZs6yB4knJyTmy6otL9byxiPilyccmWResgPdhea1u9nvzLVwXnQ1FsPUSHYAzZBVQb25wN X-Received: by 2002:a63:b44c:: with SMTP id n12-v6mr14765955pgu.337.1536029376554; Mon, 03 Sep 2018 19:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536029376; cv=none; d=google.com; s=arc-20160816; b=TmLGUz+8ySExCLbzyQuTgY6UDrNqbpdu6/7RfvhZ5j6XJkJspkOHhBZh74+jIIx6FN Ss62S+XobMn07cGwMja2Y6LqBA5akUktwlT/S1IksgnrU5NpVeoB34uqQh8J6gvVQXmo 9t5arlC8IolZO0m5glFG0b+JKhz3OZbhFtOK2/adYVdKgIo+W0qmDpOQdUNvILwIz0pe ygTns4+UiurXpoh+OjhOK+5aEclKZIMjPW9zpKLF48P1po2hDRnGpwI7YLneLRQ9OYOw sShrPaNN5Hgr1cBbfyBusIrPkIrTv4eRNjjH6BANj3tSE8w6RbrMrLsqAYQ703YIAZhK naOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=frF0BaIgA9XPi5C/PpMcQkh6hQWXokybPdUOPQVwUvU=; b=twmzKqZfARoprOeEaMpKHg9zFmQ4HzJyRpTwnMK4NlUfcR39Bue+XZhTO82ou08GsY UQFrXEictiPrvPiRnLwSyMEFOFSpB377qeU1uOHm0Eyl7vNoBzbwaNdVB5c4W/FWhOTL yscXqSCdCN0UmjDVsY/jl+JcbB7bh0DzA8zc/oZa4U/FWa+w8dQIr/up+B2I942lvLjz ldmxeZEwRIh5Tqje+F29jVeabQzEKrvfKG1u5SEB09FqWVVFemsJWLLs1Dwv1g7AU3MR uEbl2P53zvw2N6pir4n3NBsrKY1lxxdTUjapES6pETosFYUf2LTrXoA1D7UwJbN4lYH0 yJzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PoR1kxUT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az1-v6si11596081plb.513.2018.09.03.19.49.21; Mon, 03 Sep 2018 19:49:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PoR1kxUT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727841AbeIDHJN (ORCPT + 99 others); Tue, 4 Sep 2018 03:09:13 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:36819 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbeIDHJN (ORCPT ); Tue, 4 Sep 2018 03:09:13 -0400 Received: by mail-pf1-f194.google.com with SMTP id b11-v6so916526pfo.3; Mon, 03 Sep 2018 19:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=frF0BaIgA9XPi5C/PpMcQkh6hQWXokybPdUOPQVwUvU=; b=PoR1kxUTkBYKfsf8gjErzPf/Pu9K2R/qFm+Lzt77zWDG+DvqiU2rxda1FCFeqcahbh m0jLednzMRN07iUV8PGaIwSV9FAzhfwPKdipmaYJXZrdYQkOdOApGMlUsaMqDQIL7NYX jVKdLi2XBl1gTkYRnD6+N8gmvRwlJfcwHav4N8LJVd/qNZI91tQ/nV2xafSDJDbDkD9j fidWF4JoyEg6Bq5uCvd/LMqrt55Mdb3b93CEmp2wOIV2z8lcdcfTVqzK+y40tJN77Y74 wD14J21mjlA112sf+3U5cxwvo+Hko8n1PWSAjRIo8lYiDiNGTITnlhl4IH0OEvihrRwT 13pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=frF0BaIgA9XPi5C/PpMcQkh6hQWXokybPdUOPQVwUvU=; b=OzxrMhnpY84zo/9+UtJ+2sjgdqvMRMOPfwxqNGfq7yUSoYtZwCssRSTVg7ASkwhwP7 /m8fNmMDiAdei4mF+b7JqWIjUYO1IhvxNOj3dxyQWixLA73Dnfqt3Ux7Nut74nu4AEH4 CrXMs8qBr5l15uqJ36RmV2ls6aRQEbM9Sqz4/ew4huISCHw2uHRocgf/nGJFowZamXNL jgVgi+2IZoaQdXS+BDc6IBzrmYxKLA8fUlOJMUpZRRB+FVWNJAX5jvp6ByY4eFPUe6W2 aEHTqBM1MRGX1Sa8NazrjwUai/YFwI/2MKUf4z3UqdDxPvJCA413Utpgh9wcNKOWNab4 P7zQ== X-Gm-Message-State: APzg51Axv6Lusx2unvFFcfY5nabQFpI0amPKKNFN43Ct7Y42VlqixbOK pMwUOMkbbrjVS2eIbTWxmtM= X-Received: by 2002:a63:e443:: with SMTP id i3-v6mr29624135pgk.381.1536029177486; Mon, 03 Sep 2018 19:46:17 -0700 (PDT) Received: from climb.lge.net ([27.122.242.77]) by smtp.gmail.com with ESMTPSA id w16-v6sm33663284pfi.101.2018.09.03.19.46.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Sep 2018 19:46:16 -0700 (PDT) From: Jaejoong Kim To: linux-um@lists.infradead.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-s390@vger.kernel.org, devel@driverdev.osuosl.org, greybus-dev@lists.linaro.org, linuxppc-dev@lists.ozlabs.org, linux-serial@vger.kernel.org, sparclinux@vger.kernel.org, linux-usb@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 17/25] misc: pti: Change return type to void Date: Tue, 4 Sep 2018 11:44:43 +0900 Message-Id: <1536029091-4426-18-git-send-email-climbbb.kim@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com> References: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since tty_standard_install() always returns 0, the return type has changed to void. Now apply this and remove the obsolete error check. Signed-off-by: Jaejoong Kim --- drivers/misc/pti.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c index 41f2a9f..5c885a1 100644 --- a/drivers/misc/pti.c +++ b/drivers/misc/pti.c @@ -462,26 +462,24 @@ static int pti_tty_install(struct tty_driver *driver, struct tty_struct *tty) { int idx = tty->index; struct pti_tty *pti_tty_data; - int ret = tty_standard_install(driver, tty); - if (ret == 0) { - pti_tty_data = kmalloc(sizeof(struct pti_tty), GFP_KERNEL); - if (pti_tty_data == NULL) - return -ENOMEM; + tty_standard_install(driver, tty); + pti_tty_data = kmalloc(sizeof(struct pti_tty), GFP_KERNEL); + if (pti_tty_data == NULL) + return -ENOMEM; - if (idx == PTITTY_MINOR_START) - pti_tty_data->mc = pti_request_masterchannel(0, NULL); - else - pti_tty_data->mc = pti_request_masterchannel(2, NULL); + if (idx == PTITTY_MINOR_START) + pti_tty_data->mc = pti_request_masterchannel(0, NULL); + else + pti_tty_data->mc = pti_request_masterchannel(2, NULL); - if (pti_tty_data->mc == NULL) { - kfree(pti_tty_data); - return -ENXIO; - } - tty->driver_data = pti_tty_data; + if (pti_tty_data->mc == NULL) { + kfree(pti_tty_data); + return -ENXIO; } + tty->driver_data = pti_tty_data; - return ret; + return 0; } /** -- 2.7.4