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: 1354611 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 798A4DFF0F for ; Tue, 21 Aug 2012 12:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325Ab2HUMVe (ORCPT ); Tue, 21 Aug 2012 08:21:34 -0400 Received: from na3sys009aog129.obsmtp.com ([74.125.149.142]:41297 "EHLO na3sys009aog129.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757327Ab2HUMUn (ORCPT ); Tue, 21 Aug 2012 08:20:43 -0400 Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]) (using TLSv1) by na3sys009aob129.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 lahd3 with SMTP id d3so3939108lah.0 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=QcbIuesUw+o7MnluyZWjREgBDcVH0f9WHNvQ0/KU0rkNsTCSoenSB5AfSAIDeAebLJ QHB5shF0OZP3vPzDEwkzJP4c2lHySkl7gn0cV+4/QNoeh0kzkyVxHV8Be03Js9l+2B0U YqW55vxyQwtF/46znINePYj6lnMuvjlb+d4jyDP7EqN4xeXD2rnaN5jyHXEuMwYAOkoL TrNTJi7sz9i9fKesPNPXUfFmPHYd9ZKxvZy4dH9w9rXjin9kgHTAFi5fSeV7NSex1I+v APq59/1OJG4e/Yyy0BE7mNv1Z2GkBcLOPt2ukAzZK8WgbVMO8E20qnUGpg0untKqr08L EFMg== 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 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 , Felipe Balbi 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: ALoCoQkyj5RPrma9pzexEEFL2es3IP9qRQlSHYa3xkf7T3ZXihb9FWIG9s+syNzXAhwHYjHrnP02 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. 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; }