From patchwork Tue Nov 17 13:40:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7637381 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84BEFBF90C for ; Tue, 17 Nov 2015 13:42:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2BCA204B5 for ; Tue, 17 Nov 2015 13:42:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE6A22052D for ; Tue, 17 Nov 2015 13:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753785AbbKQNkc (ORCPT ); Tue, 17 Nov 2015 08:40:32 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36533 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753765AbbKQNk2 (ORCPT ); Tue, 17 Nov 2015 08:40:28 -0500 Received: by pacdm15 with SMTP id dm15so9537680pac.3; Tue, 17 Nov 2015 05:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Gi5yUx5UzgdnvOfhrKnHooPQlj6zCKc53gehxMIL87Y=; b=QgZPY8q2L2Ki+dSqXbc/Upj+EAvVgYRUAqWyyK1nb9wPkBUxw3VBSy13R8vebGs6S2 ttW6LV/cpCFGdT+u7gzQ/j+rvdwN7dW+sObJyUOqx/JthXBX//b8bGY+5u/dbsjAcSpg 3iV4eb7JwZYRyyc1kjrhckEIKTjluWtntF+xA4A+pWINkB81J8S/q8ntDFBHkZGA2ARL pjAMcZpEHMC7CJCRjBIKmE6SKGB4d/7z5mI/v3Nd1wzf1/hoGmEwlxiAO88lxd55kdvf 0ZVgENe1NlCGyL24bCYWnPlto+NydzfIa7Kje2+IvSZZqA11UlyI5ve59o2sSQo174RM 2JdQ== X-Received: by 10.66.141.231 with SMTP id rr7mr63440155pab.123.1447767627472; Tue, 17 Nov 2015 05:40:27 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([122.169.153.10]) by smtp.gmail.com with ESMTPSA id pa4sm43099411pbc.0.2015.11.17.05.40.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Nov 2015 05:40:26 -0800 (PST) From: Sudip Mukherjee To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Sudip Mukherjee Subject: [PATCH 1/5] Input: db9 - clear unused function pointers Date: Tue, 17 Nov 2015 19:10:15 +0530 Message-Id: <1447767619-28329-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP db9_parport_cb is a local uninitialized structure and the member function pointers will be pointing to arbitrary locations unless they are cleared. Fixes: 2260c419b52b ("Input: db9 - use parallel port device model") Signed-off-by: Sudip Mukherjee --- drivers/input/joystick/db9.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index 932d073..da32609 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c @@ -592,6 +592,7 @@ static void db9_attach(struct parport *pp) return; } + memset(&db9_parport_cb, 0, sizeof(db9_parport_cb)); db9_parport_cb.flags = PARPORT_FLAG_EXCL; pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx);