From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38A6CC761A6 for ; Mon, 27 Mar 2023 12:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232842AbjC0MWk (ORCPT ); Mon, 27 Mar 2023 08:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232775AbjC0MWT (ORCPT ); Mon, 27 Mar 2023 08:22:19 -0400 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAEF55582 for ; Mon, 27 Mar 2023 05:20:46 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7898E240197 for ; Mon, 27 Mar 2023 14:20:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1679919614; bh=FeXOoQUc6PRSMgFlkyS7zSZ95m6sTHjTayMcbvKNQxo=; h=Subject:From:To:Cc:Date:From; b=KuCf1QAUEh8gntcDJpxSKNjQtAtEwBaMhDZnR6dq0accQ/UDK5hsRkBQOKf519gQ9 L0s8lQhop1SvBr62847sTQPiMQJAo+45j5JpIw/l4+l1V8ufZxmb7opaqXtGa4bAae W2RRgXnixWZ4LQnvVuRuLToBJJZKJdKROmu9lCUukZlTYZdIFlEH0+O6qGWThwQekG T7/1l6qGqhFTN2oGSnRw9f/JgyIv5S6fp9fjSLMEuWFCYRrctsbpn/ZDguSIv1qcsJ dbs1f3fZRrwcfdiU0YaMQiwL4lhWpoxw0kE80saTFf/QaMud4EBM5f45wL8W9s70l7 9KxZYl1taVwnw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PlX2P523Rz9rxV; Mon, 27 Mar 2023 14:20:13 +0200 (CEST) Message-ID: Subject: Re: [PATCH v3] media: hi846: Fix memleak in hi846_init_controls() From: Martin Kepplinger To: Wei Chen Cc: mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 27 Mar 2023 12:20:13 +0000 In-Reply-To: <20230327115809.297633-1-harperchen1110@gmail.com> References: <20230327115809.297633-1-harperchen1110@gmail.com> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Montag, dem 27.03.2023 um 11:58 +0000 schrieb Wei Chen: > hi846_init_controls doesn't clean the allocated ctrl_hdlr > in case there is a failure, which causes memleak. Add > v4l2_ctrl_handler_free to free the resource properly. > > Fixes: e8c0882685f9 ("media: i2c: add driver for the SK Hynix Hi-846 > 8M pixel camera") > Signed-off-by: Wei Chen just for the future: you don't need to send a new revision for tags- addition only. That's usually something that maintainers can do when applying, also (semi-)automated. But *if* you send a new revision (due to other changes), you *should* add all appropriate tags. So for this new revision you forgot this: Reviewed-by: Martin Kepplinger but, as you now know, you should not create a new revision for this alone. thanks, martin