From patchwork Thu Aug 23 10:32:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1365931 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 884B33FC66 for ; Thu, 23 Aug 2012 10:43:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933749Ab2HWKm5 (ORCPT ); Thu, 23 Aug 2012 06:42:57 -0400 Received: from na3sys009aog134.obsmtp.com ([74.125.149.83]:37811 "EHLO na3sys009aog134.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933834Ab2HWKhg (ORCPT ); Thu, 23 Aug 2012 06:37:36 -0400 Received: from mail-lpp01m010-f54.google.com ([209.85.215.54]) (using TLSv1) by na3sys009aob134.postini.com ([74.125.148.12]) with SMTP ID DSNKUDYH7x+cZG19DL3Vr6QnK85jpozcf3N1@postini.com; Thu, 23 Aug 2012 03:37:36 PDT Received: by lage12 with SMTP id e12so392758lag.13 for ; Thu, 23 Aug 2012 03:37:34 -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=Sj1ewJNKv5J1gLeo2+M+G/RqLcJUNYEWSu5aF+gEjSc=; b=iF11PDbYQcUR9Nm31Kcwgx5Kxgo0MnQAMjCQv2Ve7/7OOpIkbGYyfvaNl7p6A3HLiT kCqriQ+GOzzIbIp428e4iU7VvswOrSYLJ/RidtNp12mw0YHSGmeiYWzfWOqqJBH/7H3d fem2Q4g7v1xiwoJuCyqRQ7zUn90U2mUUdVgyzy3MhdMUf0y57GyTAYljKiQXe5C+/C1R 68Axf8slu7E0CDGjvtYAF6XA21vY8Y80p7WUXnPZN7sejm1hhgceJVDtp+cnTJKyUHoX EqvImlcIc+g1CEvLhUH9hCdJNVlCIyCtT+BsR2ixdY1UMEfq09gBedw1Aembqm7lvON6 ZSzA== Received: by 10.112.38.67 with SMTP id e3mr593926lbk.98.1345718254078; Thu, 23 Aug 2012 03:37:34 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id n7sm1781281lbk.10.2012.08.23.03.37.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 03:37:33 -0700 (PDT) From: Felipe Balbi To: alan@linux.intel.com Cc: Tony Lindgren , Kevin Hilman , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , linux-serial@vger.kernel.org, Linux Kernel Mailing List , Santosh Shilimkar , Shubhrajyoti Datta , Sourav Poddar , Felipe Balbi Subject: [PATCH v3 11/23] serial: omap: drop unnecessary check from remove Date: Thu, 23 Aug 2012 13:32:51 +0300 Message-Id: <1345717983-18179-12-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc3 In-Reply-To: <1345717983-18179-1-git-send-email-balbi@ti.com> References: <1345717983-18179-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQlsb+zt3Firftpffr9GZG8WtwtE4P6AF5Ml5MxkcJeXgjq4HvmzWlTuscWiPGYzbzF5I/we Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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. Tested-by: Shubhrajyoti D 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 9f709d4..9581741 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1336,13 +1336,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; }