From patchwork Fri Sep 7 02:38:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 1415201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 2C455DFFCF for ; Thu, 6 Sep 2012 14:40:03 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9dCb-0008TH-Re; Thu, 06 Sep 2012 14:37:06 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T9dCX-0008Q5-TX for linux-arm-kernel@lists.infradead.org; Thu, 06 Sep 2012 14:37:02 +0000 Received: by mail-pb0-f49.google.com with SMTP id rq8so2648303pbb.36 for ; Thu, 06 Sep 2012 07:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=5GTX8VKmPMTrAhYfY5CK3FuI/RC82lIQy1Xq/sZeERI=; b=RypNAeeXnsoBj4kylWm/OPD2iadMYSagBxNuMGCaWrIYa5dX13345WOk9s+6xPmUAd kvcqdq2k+kE9P7v0FC5gBeOKojuaPwmlSGi48ASScaYOX1+2S1waUS0Fy1CdbPcuLOMl h5h7BxFM3LFExbCzYV1STKNyx0mjy8ryoA/NnM3UvIhYncMhyQdrDforGcWqhawAnxsx Bnvk2cHpxvZ0c8wTX9CsZroQB0j0CwWDmWp3F5W0LL046xTMxySkrpQSP2d9CvBMy3C1 IzAIE5mpI3r9Ke1b7ZBP2487BqHH0V+SB92bGtkfr/SmeWggVS1QA0YFQPWtAGJY5vzC eFdQ== Received: by 10.68.232.194 with SMTP id tq2mr4853833pbc.111.1346942221685; Thu, 06 Sep 2012 07:37:01 -0700 (PDT) Received: from localhost.localdomain.Home ([218.81.144.166]) by mx.google.com with ESMTPS id ty1sm1426851pbc.76.2012.09.06.07.36.57 (version=SSLv3 cipher=OTHER); Thu, 06 Sep 2012 07:37:01 -0700 (PDT) From: Huang Shijie To: gregkh@linuxfoundation.org Subject: [PATCH 2/2] serial: mxs-auart: put the device in mxs_auart_probe() Date: Thu, 6 Sep 2012 22:38:41 -0400 Message-Id: <1346985521-2248-2-git-send-email-shijie8@gmail.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1346985521-2248-1-git-send-email-shijie8@gmail.com> References: <1346985521-2248-1-git-send-email-shijie8@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shijie8[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 3.2 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (shijie8[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, shawn.guo@linaro.org, Huang Shijie , linux-arm-kernel@lists.infradead.org, alan@linux.intel.com 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 We call the get_device() in the mxs_auart_probe(). For the balance of the reference count, we should put the device in the mxs_auart_remove(). Signed-off-by: Huang Shijie --- drivers/tty/serial/mxs-auart.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index ea5f888..6898413 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -796,6 +796,7 @@ static int __devexit mxs_auart_remove(struct platform_device *pdev) auart_port[pdev->id] = NULL; + put_device(s->dev); clk_put(s->clk); free_irq(s->irq, s); kfree(s);