From patchwork Thu Sep 6 12:45:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1414161 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 6D0BEE00B2 for ; Thu, 6 Sep 2012 12:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755499Ab2IFMuo (ORCPT ); Thu, 6 Sep 2012 08:50:44 -0400 Received: from na3sys009aog103.obsmtp.com ([74.125.149.71]:51343 "EHLO na3sys009aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755451Ab2IFMug (ORCPT ); Thu, 6 Sep 2012 08:50:36 -0400 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKUEicG2ERqYy39CMQ4jhQcRQB6Y51LfMm@postini.com; Thu, 06 Sep 2012 05:50:36 PDT Received: by lagy9 with SMTP id y9so1063230lag.19 for ; Thu, 06 Sep 2012 05:50: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=ehbkEDAcbyetlh/ndN/r4f1iK5JTOO72PsZYjwKHgm4=; b=aHqpvZ3EiGft+ITlHyCLz022JECQrLvSyW577MeL1nii5OuOUu+tflmr7sHRbXE+yo UepeUWwOrHZO8ks941O/VFjTsUd7+hkRK45fIoRXPhYPqTL9yQU4PqKd9YTvbJaacbYm keOZ/muWZfURwTLtfQLl8EKDuKPfxn76J9EgLyPcSenzXm+hsZNg8EIhYhW+B25meCiJ Zaci4CAxW5E6yi2SHevR0Vx7Y1pM/M52eW3ve951F+CrzNno1s9irSSnph+jmMqlYgIs J1RlRKyTFj/OGiqVjbAZ4R9jbVI5/oZRodiN5RLOh9M+WWNjwESAG2uF1/TbcJZlf4EZ Xsdg== Received: by 10.152.112.136 with SMTP id iq8mr1815381lab.18.1346935834037; Thu, 06 Sep 2012 05:50:34 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id s8sm564981lba.7.2012.09.06.05.50.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 05:50:33 -0700 (PDT) From: Felipe Balbi To: Greg KH Cc: alan@linux.intel.com, 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 v4 09/21] serial: omap: drop unnecessary check from remove Date: Thu, 6 Sep 2012 15:45:28 +0300 Message-Id: <1346935540-1792-10-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc3 In-Reply-To: <1346935540-1792-1-git-send-email-balbi@ti.com> References: <20120906122948.GC29202@arwen.pp.htv.fi> <1346935540-1792-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQn5l1MPydzo+L4ynQk68rAe9pBtjh5DsCVbotf473ZzvSXKvyWnc4cSIjRJRhvDlGHB+CEK 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 8a696a4..c19d340 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1369,13 +1369,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; }