From patchwork Fri Feb 28 22:19:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sensoray-dev X-Patchwork-Id: 3744791 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 18282BF13A for ; Fri, 28 Feb 2014 22:51:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AE3A20266 for ; Fri, 28 Feb 2014 22:51:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6331A20263 for ; Fri, 28 Feb 2014 22:51:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbaB1Wvj (ORCPT ); Fri, 28 Feb 2014 17:51:39 -0500 Received: from gateway16.websitewelcome.com ([67.18.44.28]:52979 "EHLO gateway16.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751449AbaB1Wvi (ORCPT ); Fri, 28 Feb 2014 17:51:38 -0500 X-Greylist: delayed 1899 seconds by postgrey-1.27 at vger.kernel.org; Fri, 28 Feb 2014 17:51:38 EST Received: by gateway16.websitewelcome.com (Postfix, from userid 5007) id 1942C8704A7EF; Fri, 28 Feb 2014 16:19:58 -0600 (CST) Received: from gator3086.hostgator.com (ns6171.hostgator.com [50.87.144.121]) by gateway16.websitewelcome.com (Postfix) with ESMTP id F25438704A7AA for ; Fri, 28 Feb 2014 16:19:57 -0600 (CST) Received: from [50.43.67.108] (port=49903 helo=localhost.localdomain) by gator3086.hostgator.com with esmtpa (Exim 4.80.1) (envelope-from ) id 1WJVme-0002SY-KN; Fri, 28 Feb 2014 16:19:56 -0600 From: Dean Anderson To: hverkuil@xs4all.nl, kbuild@01.org, dan.carpenter@oracle.com, m.chehab@samsung.com, linux-dev@sensoray.com, linux-media@vger.kernel.org Subject: [PATCH] s2255drv: urgent memory leak fix. Date: Fri, 28 Feb 2014 14:19:44 -0800 Message-Id: <1393625984-4276-1-git-send-email-linux-dev@sensoray.com> X-Mailer: git-send-email 1.7.9.5 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3086.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sensoray.com X-BWhitelist: no X-Source-IP: 50.43.67.108 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (localhost.localdomain) [50.43.67.108]:49903 X-Source-Auth: dean@sensoray.com X-Email-Count: 7 X-Source-Cap: c2Vuc29yYXk7c2Vuc29yYXk7Z2F0b3IzMDg2Lmhvc3RnYXRvci5jb20= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Critical bug fix. Fixes memory leak introduced by commit 47d8c881c304642a68d398b87d9e8846e643c81a. Signed-off-by: Dean Anderson --- drivers/media/usb/s2255/s2255drv.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index ef66b1b..4964194 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -2175,11 +2175,6 @@ static int s2255_stop_acquire(struct s2255_vc *vc) mutex_lock(&dev->cmdlock); chn_rev = G_chnmap[vc->idx]; - buffer = kzalloc(512, GFP_KERNEL); - if (buffer == NULL) { - dev_err(&dev->udev->dev, "out of mem\n"); - return -ENOMEM; - } /* send the stop command */ buffer[0] = IN_DATA_TOKEN; buffer[1] = (__le32) cpu_to_le32(chn_rev);