Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3070107imm; Mon, 13 Aug 2018 05:36:38 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwRlHekJccskc7T9oR3BADdNDg1dAowHYXK5EIwpE7ztdfQodW2z0iFNHckesGJvX0ZE55N X-Received: by 2002:a17:902:6b47:: with SMTP id g7-v6mr16647712plt.128.1534163798260; Mon, 13 Aug 2018 05:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534163798; cv=none; d=google.com; s=arc-20160816; b=ZfTbc4fB/V3XAhhe7WrjpSFsPHD6ef6ZGMzH1fo844hBFSZxdEdQT6Ca9ZuM0TqPsp C5ltKxe7cCeszBuofyM5S1cfV+fO01u0rx9fh6MWrGv+APapIsa0yg1Zo6AGk99AqkXB PWSJ+EfbC7y/n+HD0UIm2kPrc456kZR4fO58AOBBN8IEErTcS+rUxCcI55XxiG8HMaps XxZYy0Z7rvEzYbKRn3r9YtwMGFDED7Ej4/xQXo5WAuvDBOjfPNJ1okg0ccoyHi8tgMkI 2m3uHv2T0CP3hzTHlpxoBr1GT05Og6WfcLIqdHYaT3Y9uoq/nyibTU2jciCfUf5elymw Qbvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=y7MNtO+SnBwn7ldU/8CiVYDIz//r/E/2DbGvzOFQyu4=; b=zz9WUkbman0NWHNQDdEOvtulSQPGV2S+oCSz5ptM08Yy0wtwWgWZztwin3PskAtVJo K7K/+04ebxjaZdJVtfalP4XrMFRNEQZQ3ORNAlJiBPUbfyhbmjKCzfX7RkIq+FjuxgsX JoO6qSNtzTzU9aMEZ+baiOT1w8eNP3wLz+NE2dK4YkKbE0nPgTKQtpsUMyfLOknML1jJ enMw60zIGDEeuoBanoW50iLQNW+UIDP3hwR+SbrwwM77uHByhjT3hYoXcDjhCa3o7OSE blac1ZFXHFi8xqRWf86Fmf68GTRw4Py34wKoLA1GEAn8d9TSMJV9XZXujNtM65FuO8QD 1cPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gC2ahVI1; 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=QUARANTINE 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 r7-v6si14972798pgn.491.2018.08.13.05.36.23; Mon, 13 Aug 2018 05:36:38 -0700 (PDT) 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=gC2ahVI1; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729532AbeHMOaQ (ORCPT + 99 others); Mon, 13 Aug 2018 10:30:16 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:43866 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729354AbeHMOaP (ORCPT ); Mon, 13 Aug 2018 10:30:15 -0400 Received: by mail-lf1-f65.google.com with SMTP id f135-v6so11003260lfg.10; Mon, 13 Aug 2018 04:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y7MNtO+SnBwn7ldU/8CiVYDIz//r/E/2DbGvzOFQyu4=; b=gC2ahVI1KxCU4Ixm9N8deh/gsAqGLQnoWfTfLjPIyZJFJj767QQiYV/mvz5BrV+C0d nBvz7wC+WMnY6t6LUu/1xSrz5jLc+xUA2A/yb40NwZrQGiUrF03dSzOVV3b80nCkUS45 JmvApEK7W5Vzsapij/9HCYzLtkJlstHck7QQFFD6UlbyUqNJs04eEtvlAmHao9chLUVH 8KXiLFsITI/KuLkEKfy6/njcQ1pZtLobbqCZk4CbVwEUxMO3lSe6VjwN9iRQkqWDQc7O /SSQkFu794nK50gdG/6DYbVdH7Gs7eLJPertOJtfyWNrX2ayUFNMhaNxeb8r7K691Ozm tvrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y7MNtO+SnBwn7ldU/8CiVYDIz//r/E/2DbGvzOFQyu4=; b=Uj1SpQksZa65X4yyAUpEUiqYecM4609cragCZmPEkn8/8Vc6EbP9UIQyOmWTtmhcNg nsFGy8L4X4moKadGanLd1/GNowHRUOCbO5EOWaOOoGorF+7qsox3LVxlTns0r7eV40rq srWDKVE4p2KWIckdTXllFa4EJz8cEsCkSGjgCKYCo/cWY4X23mbEi5w/2RA5lBQZpLKG mXajzdjkK1akb3J8qXcProH+4TAo8ysUyZEd4iFLqXAJQSj8ycr19+QhzRsMS+8ZOp2n TLwcCzz5i9G+3sFqDxcr+xD/88psC725y087VNTD9+i0C54vtU3DKQ0XKOTQJJqCZxPv EHHQ== X-Gm-Message-State: AOUpUlEYF59AhzvEwPuMu2zev6AjWhbrrZPk3mVMOMkR3grhP+dBXHGh zqLH1TksrOUzNYw6igCPciic7jza2r5IJ6FthMUwNt7O X-Received: by 2002:a19:c64c:: with SMTP id w73-v6mr2476412lff.2.1534160897463; Mon, 13 Aug 2018 04:48:17 -0700 (PDT) MIME-Version: 1.0 References: <20180806155025.8912-1-vasilyev@ispras.ru> In-Reply-To: <20180806155025.8912-1-vasilyev@ispras.ru> From: "Lad, Prabhakar" Date: Mon, 13 Aug 2018 12:47:50 +0100 Message-ID: Subject: Re: [PATCH v2 1/2] media: davinci: vpif_display: Mix memory leak on probe error path To: Anton Vasilyev Cc: Mauro Carvalho Chehab , linux-media , LKML , ldv-project@linuxtesting.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Thanks for the patch. On Mon, Aug 6, 2018 at 4:50 PM Anton Vasilyev wrote: > > If vpif_probe() fails on v4l2_device_register() then memory allocated > at initialize_vpif() for global vpif_obj.dev[i] become unreleased. > > The patch adds deallocation of vpif_obj.dev[i] on the probe error path. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Anton Vasilyev > --- > v2: divided the original patch into two and made stylistic fixes based > on the Prabhakar's rewiev. > --- > drivers/media/platform/davinci/vpif_display.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > Acked-by: Lad, Prabhakar Cheers, --Prabhakar Lad