From patchwork Tue Aug 21 09:15:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1353121 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 5EDE540210 for ; Tue, 21 Aug 2012 09:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755524Ab2HUJVk (ORCPT ); Tue, 21 Aug 2012 05:21:40 -0400 Received: from na3sys009aog122.obsmtp.com ([74.125.149.147]:34511 "EHLO na3sys009aog122.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755355Ab2HUJUf (ORCPT ); Tue, 21 Aug 2012 05:20:35 -0400 Received: from mail-lpp01m010-f47.google.com ([209.85.215.47]) (using TLSv1) by na3sys009aob122.postini.com ([74.125.148.12]) with SMTP ID DSNKUDNS4TROHCe7MVZs0yKggOOOnDjUg6LK@postini.com; Tue, 21 Aug 2012 02:20:35 PDT Received: by lagv3 with SMTP id v3so3466254lag.6 for ; Tue, 21 Aug 2012 02:20:31 -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=LIjbI+H1OE8acgAIUX3t2uNl0wN3PxxYHKCcByp3S5o=; b=ZZyWylo03iepvvlhl18ZVBjgSZxO+a5mXPyzcEBdbhjOCC9Hr7cj5215IstYLB2hXC UtWUu1f4uyOAzOvFZAReAHt+EA4U22Bh3WTtHoufRBpTs9YbOpE8FoHWIm8XdbnkOPrE UGI6Z1z5cDo7CxhdxOnYQmQgmfb6vKvSyvbuJpgMVUIBTzhulTbw3bfDKWCnAMAffIBu 17I9p/pVLlDwJrXzu6iErqybuw+13/8NkzDaPYmRxdhlv6K2OAb+U8gGTII0JccMIOHP ihOTH/4ybFRpZMK7RSaGO2ENIzkM48GfmoLWnHLsPv0PYEHi6xtudoMslyyOuovOd+jW ritg== Received: by 10.112.50.106 with SMTP id b10mr636097lbo.51.1345540831024; Tue, 21 Aug 2012 02:20:31 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id r8sm280834lba.15.2012.08.21.02.20.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 02:20:30 -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: [RFC/PATCH 12/13] serial: omap: drop unnecessary check from remove Date: Tue, 21 Aug 2012 12:15:54 +0300 Message-Id: <1345540555-24359-13-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc3 In-Reply-To: <1345540555-24359-1-git-send-email-balbi@ti.com> References: <1345540555-24359-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQm+Uyda6vDcwuG6rPU2xpNC8k3vU/j2b54k6pOHbYWhshP4BrmiwvlZkLfxmD3Ps2uZw7GY 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. 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 ba9cdf1..25d2055 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1334,13 +1334,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; }