Received: by 10.223.164.202 with SMTP id h10csp590412wrb; Tue, 14 Nov 2017 06:34:25 -0800 (PST) X-Google-Smtp-Source: AGs4zMaWWbLxS7Fs9pb3MdJkU/Au/bcysayRKcMFf4AZDRE9iKdCSmwG7UYR+EN4zZYH++iJfsP3 X-Received: by 10.98.144.129 with SMTP id q1mr14029378pfk.38.1510670065502; Tue, 14 Nov 2017 06:34:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510670065; cv=none; d=google.com; s=arc-20160816; b=lpckdOvTkSn0Wf/gMoWeBCQcYofFnS2beUMaocJwwmH8eG/D6EDuXCMPFYDHV5urzb 3YiRn1K5tXAWZvuWhVyevikIJDH5ogDAWiMP+WSB3jH0BPP266Et2cts6v6UYOZ6x2Rc L7kDm2weDgUzuP3WOCTSFBmsvOYwpUG7eKDdENEMevzR0CYGOhpzlj5Gftinw8vum1lM sjbbsBe8+r9NudWVqjDXH5QZwnd9Qz94QiSIfGf58QzoFcDMkekPAY0KEtV9AQq5kfSd ObT6fgahhpOfkVmCxpnDZYqmUGQkm1vGExMgHlRNqg1n6ycGfykFefa3ohq1IL1Bn+3P Fgbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=KfHKBHM/YP/d6KWgnRGZiIqRLLk7cB1irvktDr7hGDI=; b=ChzJyLAmAaM0LAVKxLL6VnVM1Xl8UDYaFyASwwJQhzDx9V5QYs0c2unflQ3RL04p2G xUdFcy5Thvv0f5c+1Mz+gI0NHKhx8jUYriKJGf6JHXQlCwS36rSInAPUZdXHEvnlfh4K aPRWrtDZAHx5i8+fgZyKPtomY6RWp7Kw8zb1QwHY/s4OyGS6/QNv70vfB/8RKrA533ln 71G8HlVAX+x+zFH1uTVbFrxWvw5O60p4QXxMx7QzDF0Vv3rZ8tGMKn3/PzJJq6+0S+PO RmYpOVsgAgROAmuwZhTIkn4nDt6Jxw4GAu+XZ6w9QPNH3F4J0LwtqudfcuCB2rxbKRqL QekA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U0UUGrtF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si15516127pgq.440.2017.11.14.06.34.13; Tue, 14 Nov 2017 06:34:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U0UUGrtF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755443AbdKNNqR (ORCPT + 88 others); Tue, 14 Nov 2017 08:46:17 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:50297 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753745AbdKNNqL (ORCPT ); Tue, 14 Nov 2017 08:46:11 -0500 Received: by mail-pf0-f194.google.com with SMTP id u70so9652902pfa.7; Tue, 14 Nov 2017 05:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=KfHKBHM/YP/d6KWgnRGZiIqRLLk7cB1irvktDr7hGDI=; b=U0UUGrtFtJ5Zf43g3Zy+PgFXKNZT06qBbvVNWhdsCTyB/e4RPUiW5wy+g0PKPo2nHb MKYAX754aRSsZdfJ0vHVSNWjsqFTZKkUxU6CxwRfbTX19wVaufJVTmLV2O8ctGLguVRV zn07LcH1Zeqvf/LGkhS0Rbw32gUqsN4ZPGmHR1wfDhWMkvfAYbYV9cKjX6Pxa3XqNMDP DaI21d9kFFSb28BxdmUC9tqPsRQNP4wugfndeCGlAs4GijtvXW9K0K87VlP950BNeJMm 9TiIHraa4U6s86nbpcJpQuduZvmNc7xhUMZRouQSzHDuEZwE1ADG7YuXVNu4YX0d9/b1 AzHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KfHKBHM/YP/d6KWgnRGZiIqRLLk7cB1irvktDr7hGDI=; b=VCjRb9ihD/0g+YXiUIW6Mw8a/MMdnv7xIsOaP3eqtkpjQKCK/c7hjjsASWBLMXhUE2 LgqZtuNnB4epP0Bljwsjq5rt3juIv4hepUn/a2Rfr3vGonr/dOJ2CUWCOh5hF4ly/otE 0QYkK/ZE05D3OfnY6RlFjJgde+T2DEs2lktplafdDNGAZxbzOJMFuwXg0UGLonhvc8Mi 1vjLFNNE5oYBLtvDyAK7X1BxIrp8TfgvfCNhK98ZZereEZZmMkeJF9oQ7niT4Uvap9VM BDHQc+3kQ10fIcpbiNSZB8N+mNiVovm/OP+zxwu3kYUb7AOXnLEh05KO6BaTsKYn9zM4 38Tg== X-Gm-Message-State: AJaThX6BRZUknjE9paWLwi/vreEjjScPzSWUspNGD+PofxBu3dN3sYhC sG83TVqKWNfOnM9y8BMib0XQMA== X-Received: by 10.101.74.199 with SMTP id c7mr11918023pgu.169.1510667170838; Tue, 14 Nov 2017 05:46:10 -0800 (PST) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id z6sm39701349pfe.170.2017.11.14.05.46.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Nov 2017 05:46:09 -0800 (PST) From: Arvind Yadav To: dmitry.torokhov@gmail.com, linux@roeck-us.net Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH] Input: davinci_keyscan: Free memory occupied by davinci key scan device Date: Tue, 14 Nov 2017 19:15:14 +0530 Message-Id: <9203eaebf020cbebf5224221d789a0163490d654.1510666872.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here, key_dev is NULL in input_free_device() and It will not free memory occupied by davinci key scan device. Move "key_dev = NULL" after input_free_device(). Signed-off-by: Arvind Yadav --- drivers/input/keyboard/davinci_keyscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index b20a5d0..22cb8d2 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c @@ -290,13 +290,13 @@ static int __init davinci_ks_probe(struct platform_device *pdev) free_irq(davinci_ks->irq, davinci_ks); fail5: input_unregister_device(davinci_ks->input); - key_dev = NULL; fail4: iounmap(davinci_ks->base); fail3: release_mem_region(davinci_ks->pbase, davinci_ks->base_size); fail2: input_free_device(key_dev); + key_dev = NULL; fail1: kfree(davinci_ks); -- 1.9.1 From 1584035475365712044@xxx Tue Nov 14 10:05:49 +0000 2017 X-GM-THRID: 1584035475365712044 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread