From patchwork Tue Aug 21 12:16:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1354871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 5A6B03FC81 for ; Tue, 21 Aug 2012 12:28:07 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T3nVF-0006Rh-FF; Tue, 21 Aug 2012 12:24:16 +0000 Received: from na3sys009aog133.obsmtp.com ([74.125.149.82]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1T3nRr-0004SA-Pr for linux-arm-kernel@lists.infradead.org; Tue, 21 Aug 2012 12:20:45 +0000 Received: from mail-lb0-f177.google.com ([209.85.217.177]) (using TLSv1) by na3sys009aob133.postini.com ([74.125.148.12]) with SMTP ID DSNKUDN9Gv1gZaBcD+qU/Li+LJ5mjfxtZPoH@postini.com; Tue, 21 Aug 2012 05:20:43 PDT Received: by lbbgf7 with SMTP id gf7so4603886lbb.8 for ; Tue, 21 Aug 2012 05:20:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=3b05FWnKoARuHDXS9Isczy8rsG8AWZPnqpyagOv5mWY=; b=IDoxmGpmxd0zonrt8lKUEuLWqhxAzA1zZMPodXipqVlWhOKdCFr/lbondRm7b0Xf8G dGWdgfhJm2XSjoF+kIVuGtjofdMNavheFGsOwaD6mDa8IfDk1Plh935B9yydhKKOwbQ2 CH40Gd2nt7IdsMsUqnCtkXczb+LIkv1abTlR0SXy3MOxDSdFn6luT/3ZwCyoAZDMkwQ5 3GNQPTbtNQAEGAoipstzliHKIU2SUmaT9boDwvn2r3lVeHwGNCDOahiaPP7zK9/nGuJN /cowSFeJQAauRK+g4Byxq80SpI/gJXPPz7zTJGM8cjXMKclOT9KN8aZJflMKK5rNh9V8 1Bvg== Received: by 10.112.102.68 with SMTP id fm4mr7814021lbb.19.1345551640744; Tue, 21 Aug 2012 05:20:40 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id sn2sm1360318lab.16.2012.08.21.05.20.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 05:20:39 -0700 (PDT) From: Felipe Balbi To: alan@linux.intel.com Subject: [PATCH v2 11/13] serial: omap: drop unnecessary check from remove Date: Tue, 21 Aug 2012 15:16:09 +0300 Message-Id: <1345551371-18862-12-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc3 In-Reply-To: <1345551371-18862-1-git-send-email-balbi@ti.com> References: <1345540555-24359-1-git-send-email-balbi@ti.com> <1345551371-18862-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQmwvJOWw6OzwnST/aqQvynIzMBYedA0wzi137/+pyXYjDRZDD0odJSc0nHQ/1qGe2H8XL2P X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.82 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kevin Hilman , Tony Lindgren , Linux Kernel Mailing List , Felipe Balbi , Santosh Shilimkar , linux-serial@vger.kernel.org, Linux OMAP Mailing List , Shubhrajyoti Datta , Linux ARM Kernel Mailing List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org if platform_get_drvdata() returns NULL, that's quite a nasty bug on the driver which we want to catch ASAP. Otherwise, that check is hugely unneeded. Acked-by: Santosh Shilimkar Signed-off-by: Felipe Balbi --- drivers/tty/serial/omap-serial.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 1aaba77..2e1a33a 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1337,13 +1337,10 @@ static int serial_omap_remove(struct platform_device *dev) { struct uart_omap_port *up = platform_get_drvdata(dev); - if (up) { - pm_runtime_disable(up->dev); - uart_remove_one_port(&serial_omap_reg, &up->port); - pm_qos_remove_request(&up->pm_qos_request); - } + pm_runtime_disable(up->dev); + uart_remove_one_port(&serial_omap_reg, &up->port); + pm_qos_remove_request(&up->pm_qos_request); - platform_set_drvdata(dev, NULL); return 0; }