Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp810971ybl; Fri, 6 Dec 2019 06:38:04 -0800 (PST) X-Google-Smtp-Source: APXvYqxXXMqk5zZZ0C5FaFynZSoXOkB/dO+MyaqFtpgoQWsLDuPAuVDYOoAHceeHs5jyiJJf1p3+ X-Received: by 2002:a05:6808:7d9:: with SMTP id f25mr11958060oij.139.1575643084603; Fri, 06 Dec 2019 06:38:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575643084; cv=none; d=google.com; s=arc-20160816; b=uKNNdaJUSbC/NyAFl0G4Ah8aznAO239skQ/+jEmORRELWmTaN8XFuWf+OmDJlhF+7E GsnLBNz4FH9N1v/CbdDn+WDHlzIF6HeIf6Nyun+SvXfGPrDMxGWA+xltu1X4K67v+hMw gjFGsilqvz+GqsB16vfK2eei3AqTPEsIxM32fsY66IfHxepyivNof3WncqwnC4hEj5Tu QSh/aoygCnCixcIcQI59IwfeCezjQMpjcFpwmNqtYGqhVqI+2tfpMuQOQdeWZgGhWUug fsVYkpE/rnZK1LYYEm1SyzxCqwBcj/ysQ+SR9mRWu93EwsyW17cgnlUJ9F2msuaEW4z1 9ojg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=6pqXKRvUFOG37AuALEYM3R9VG4PngpMcyaJBzg7nV3g=; b=ej9wMfDSBlGFvhCNjbt570aciX91yzr+F1JHh8N5ri3sHAG8NbZRF5q7kr02DzNa+e e0O9qfagpF6rIB0N4pajH/wRN5bBmX5pcGfccMTNPR/YpDyIzDZKYdt6okBlZUfz3N1p rADsxSN2fD5Xi265GM3jjkB4BVYPn1HL7ZcRYJgRKK8NOfqbqZCHCjch4Yv80jBiVx8q ueBrIUezy4fkru80WAu6mfeETV3kir3CCirihDkm8T422ijLUGhYCCAv/DaWWT7w+046 NaoXVED0gEJbDoIAfFZVxJHbcuwURVR3voORwaEIrisFQfErKvD+cZIQ+SoDXwFGWN9j 1izA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UOQ2KQpe; 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 w4si7496433otq.144.2019.12.06.06.37.52; Fri, 06 Dec 2019 06:38:04 -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=UOQ2KQpe; 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 S1726321AbfLFOhU (ORCPT + 99 others); Fri, 6 Dec 2019 09:37:20 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:44064 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726256AbfLFOhU (ORCPT ); Fri, 6 Dec 2019 09:37:20 -0500 Received: by mail-ed1-f67.google.com with SMTP id cm12so5918132edb.11; Fri, 06 Dec 2019 06:37:19 -0800 (PST) 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:content-transfer-encoding; bh=6pqXKRvUFOG37AuALEYM3R9VG4PngpMcyaJBzg7nV3g=; b=UOQ2KQpe9ck++pTanAdEzfd/yFGVbZiP2ZMhqgoOZMwM/Q230FJT2OgR+6mM30LfM7 AFkAS5oyZhHDejOo6pNmISpWQxCoOVKrVsgkVPMXPK85PKADrXAMWFOyJiEFIZSc0E1D c9yQPRjXyCgAg35mP39ZOV0enbfMyUquyhWJjczlmbV5Q4XdUaYI+Gc5VKW78kcP6RSj 4WszCqX9CURNDEGBcOFMV1jg2K2PReDvkf8IjPosqK3mDCsK3GvXhILtMJpu+yNCoyOD dL5rvp9jP8kJdG7n2XgUzHs2EttJWdt4IYpm7QU/fItm24xSph0oo4zJd/OPKndjRgij zhSw== 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:content-transfer-encoding; bh=6pqXKRvUFOG37AuALEYM3R9VG4PngpMcyaJBzg7nV3g=; b=njwawOiPUDNea/oA6EztSGWGm0QkKCMdwRZDtt8GLbei+sqBhdDwJiIpD3yPyckJk0 Xp9qRp9Mj9BRLEyCe9dn8l2K2NXsrmkBFwbcoO6bFVJnFcyps/XqF2zN8MtVHI/WITcM iYhT16HFpWTZNdV2w0hb35heY5U5QZ4pVjF2mXJfh5DgnPYXoV4TQktOLnugjxLI21+q fhKnPOFryapXXf1gxwxt/OTMV97C0XG1w/Vzir6Pu63SzMm9LQbGTcN0XSJay+M1cejG SVHSwan5GkWBro01zfF60NDqEvytof/7x6bW5PYQgIAMdd/M/zgDJm0C0ZCKB//1ePMm mf3A== X-Gm-Message-State: APjAAAV1J47uI35gZGNcLPbsnUBpxuEN388p/89jZo65DrjxV2h2TpZx X7l08Oc2ZgMQyeMRRIR1TydLayobX+2JD4KTX2Q= X-Received: by 2002:a17:906:12c6:: with SMTP id l6mr15393240ejb.53.1575643038507; Fri, 06 Dec 2019 06:37:18 -0800 (PST) MIME-Version: 1.0 References: <20191206120735.21873-1-hslester96@gmail.com> In-Reply-To: From: Chuhong Yuan Date: Fri, 6 Dec 2019 22:37:08 +0800 Message-ID: Subject: Re: [PATCH] media: go7007: fix a miss of snd_card_free To: Markus Elfring Cc: linux-media@vger.kernel.org, LKML , Hans Verkuil , Mauro Carvalho Chehab , Dan Carpenter Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 6, 2019 at 10:11 PM Markus Elfring wrot= e: > > > go7007_snd_init() misses a snd_card_free() in an error path. > > Add the missed call to fix it. > > How do you think about to take another look also at the previous update s= uggestion > =E2=80=9C[PATCH 5/6] [media] go7007: Use common error handling code in go= 7007_snd_init()=E2=80=9D? > https://lore.kernel.org/linux-media/05efac78-3a14-803c-5b4a-68670728628b@= users.sourceforge.net/ > https://lore.kernel.org/patchwork/patch/831887/ > https://lkml.org/lkml/2017/9/19/115 > I think using goto is really much better than freeing after every error. I will send a new version if others also agree with this pattern. Regards, Chuhong > Regards, > Markus