From patchwork Mon Jun 2 18:32:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 31306 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A077020AE6 for ; Mon, 2 Jun 2014 18:32:29 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 19sf14444383ykq.0 for ; Mon, 02 Jun 2014 11:32:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=TEmyBpoDTqufvvk28CtvGIs/X/yhDCt1MX5IlXABD+Y=; b=iTOp+nyWj5dxmUAEeQsQ3fowD89S8cMioiDlFcuhDJ7uVXLqzqnNwGnYbvyDTaBi60 kL36qKhXNGrxc/BDInNT8zBwnVdG9oNAKzLULpx8/aGbP4ZSeQm7xyF2MCN7XL3aIZBP F1GONPKM8cdCxcm+6ClD1enDBAWn6nb0amrfFwyd/WbQLdsSTwagoqeysYquPTUrNq0h Md56MBVdXgmnuR+R4R4KBS5ctSv/xpyIG49osm4pvbHM8cCPbVWAW533QUQN/vhQdusr I0idxCN0hYUJzT+vvz0vyVsSN0US58BZquC7yRSfNzh7RG53gwpXdHAQxsny5CpdUWjc RwOA== X-Gm-Message-State: ALoCoQnxQaAcYVbQeh+kWrF475S4LRLuoITlHbre9St/Rmi8h88dXcSFfEg5JJxNiCvjfnbc2LFL X-Received: by 10.52.164.236 with SMTP id yt12mr11880601vdb.8.1401733949391; Mon, 02 Jun 2014 11:32:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.134 with SMTP id t6ls2162331qgd.20.gmail; Mon, 02 Jun 2014 11:32:29 -0700 (PDT) X-Received: by 10.52.191.97 with SMTP id gx1mr2028029vdc.55.1401733949211; Mon, 02 Jun 2014 11:32:29 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id zc15si8385465vdb.79.2014.06.02.11.32.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Jun 2014 11:32:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id oz11so5711855veb.30 for ; Mon, 02 Jun 2014 11:32:29 -0700 (PDT) X-Received: by 10.58.198.107 with SMTP id jb11mr32261706vec.10.1401733949143; Mon, 02 Jun 2014 11:32:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp118236vcb; Mon, 2 Jun 2014 11:32:28 -0700 (PDT) X-Received: by 10.68.192.106 with SMTP id hf10mr42724906pbc.30.1401733948348; Mon, 02 Jun 2014 11:32:28 -0700 (PDT) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by mx.google.com with ESMTPS id u2si16747582pbz.202.2014.06.02.11.32.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Jun 2014 11:32:28 -0700 (PDT) Received-SPF: pass (google.com: domain of jaswinder.singh@linaro.org designates 209.85.160.44 as permitted sender) client-ip=209.85.160.44; Received: by mail-pb0-f44.google.com with SMTP id rq2so4523095pbb.3 for ; Mon, 02 Jun 2014 11:32:28 -0700 (PDT) X-Received: by 10.68.241.68 with SMTP id wg4mr43335892pbc.66.1401733947959; Mon, 02 Jun 2014 11:32:27 -0700 (PDT) Received: from localhost.localdomain ([117.220.133.78]) by mx.google.com with ESMTPSA id gu1sm21667262pbd.0.2014.06.02.11.32.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Jun 2014 11:32:27 -0700 (PDT) From: Jassi Brar To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, s-anna@ti.com, loic.pallardy@st.com, lftan.linux@gmail.com, slapdau@yahoo.com.au, courtney.cavin@sonymobile.com, robherring2@gmail.com, arnd@arndb.de, joshc@codeaurora.org, linus.walleij@linaro.org, galak@codeaurora.org, ks.giri@samsung.com, patches@linaro.org, bjorn@kryo.se, Jassi Brar Subject: [PATCHv6 3/3] mailbox: Fix deleteing poll timer Date: Tue, 3 Jun 2014 00:02:02 +0530 Message-Id: <1401733922-5943-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1401733450-5646-1-git-send-email-jaswinder.singh@linaro.org> References: <1401733450-5646-1-git-send-email-jaswinder.singh@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: jaswinder.singh@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: LeyFoon Tan Try to delete the timer only if it was init/used. Signed-off-by: LeyFoon Tan Signed-off-by: Jassi Brar --- drivers/mailbox/mailbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 336fa10..ae4abd9 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -480,7 +480,8 @@ void mbox_controller_unregister(struct mbox_controller *mbox) for (i = 0; i < mbox->num_chans; i++) mbox_free_channel(&mbox->chans[i]); - del_timer_sync(&mbox->poll); + if (mbox->txdone_poll) + del_timer_sync(&mbox->poll); mutex_unlock(&con_mutex); }