Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1854516lqo; Sun, 19 May 2024 01:39:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPGXSvoVKENwH4XI/72WAVDmVYcvlthSQNbbmWpvyhU9+mEeHTKvsJe7XOFtRNxlbgHcph+w6vYIYKSWFZmQLtNFTbD4/mNIL9iF7CKQ== X-Google-Smtp-Source: AGHT+IGz69mSFq6I9ATk5U91rZgKFNek06rgWlfxvgRNokDeZl9onOgVfOAFbvwy3f8TfO7zrmiu X-Received: by 2002:a17:906:7f8a:b0:a59:b6a8:4d7a with SMTP id a640c23a62f3a-a5a2d5d3d22mr1759294366b.43.1716107967448; Sun, 19 May 2024 01:39:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716107967; cv=pass; d=google.com; s=arc-20160816; b=nz7AA20W2iKKeDspJrtoRPgikuBoUCO5SZB6Lo1PMIXkSvbkDrwrKc/rUq67YHjH4f I7TdeHaElH8QuTT+nSM5ZLXpffKnKExqvit93vM50ecvrYhEcWCpLogW/tlo2VEcUC3s qS+F3zqn2QwsyPU+bkN/YosY6XOMOFNuQFxeaE5ycF83xLEGzdC05LCh5LFJ8VDFhgTA QwBBlzFnYlX0KR4ZE5Bad15GNoQrPigs+gxT2yeiB/HrvQhBAn3Y8HOb0+pIDI5GnYOI ypGX+jaVIN5/ep7kbefb+qwie+nFUpeEDTMM58kt0BviweKzAtDprD7O0s+o0wZUZVsr gmfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:subject:references:cc:to:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=mR4LJmey+5na5DaqpNGAQY1Gu3MobXSjLTQaXj5651M=; fh=BtOZ7jpnZqEmNX142PkyEc09CqV7RPaibC+M3g3LvUM=; b=A2tgDXhD55Nl3XEJxM+XuSMjdeP5gHyiCZmGEHxvwp1tQtosMC7Sp98qbZkPhi6gGc n4r58qWtNo4d4gqqvduryioyHbbl4OVL1J1i6yDP1spRmMq3Hnc+Yd4q9DPHSEgNCLW1 qa3lLwIT7xpqCOcIkuOOr1DTQCFPQhhJG+2sO2ttI3f9GAqzTap41ujpTJjdBdv8ansI NFvE0GfGicnigAK18bdAO/K1gEvKGZmIt7Nb4VZmp8p0SPjL27juP4f6uVMD7b3Q0+lK YKfd9wGw4bvvJsAgnh2ZZHYqEf6ygA6PPGZLKQFDtFpK0K3LJ/Vj4IHndDbVqbUW/B5s Ya/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b="FdK/25nw"; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-183066-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183066-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba5767si1212972666b.579.2024.05.19.01.39.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 01:39:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183066-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b="FdK/25nw"; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-183066-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183066-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E88471F2147D for ; Sun, 19 May 2024 08:39:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5029339FEF; Sun, 19 May 2024 08:39:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="FdK/25nw" Received: from mout.web.de (mout.web.de [217.72.192.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 987842D627; Sun, 19 May 2024 08:39:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.72.192.78 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716107950; cv=none; b=lYqgudnHWw8ZVMZRoryUR2ghW3swyMHTexk7HxWauQ5D4DFqlHaAsVESjkcdhMYYDOyBUtRVoGeSKHo5dTp5qadNPTk1YUtAXT0y65fFXnqrvToZce+4igz1UdD5dlTf2TthbsIMmrHSwDOfZUniEAd1VULANqFao4vWTQkEw84= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716107950; c=relaxed/simple; bh=OG/tFUAqoYY73IiNQhTa9yMsYkxiqOkEshKJYuZoq3E=; h=Message-ID:Date:MIME-Version:To:Cc:References:Subject:From: In-Reply-To:Content-Type; b=ikDKBhXnkou23IiaKEXu3kFSLtkDllY6oZtqACwCFd8o6IIZU7NyXeTCcDu/8s1VjnnG1M6iQBzNDJgCCm4O7E+nJ4bJLZZJG2Ac6ZoasMeBOaE3rv+GSLmpXG12UPZuc5KyV3RLhqPlmFL3XD6SBj4XL2E4mv2UoS2S+NrFj+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=FdK/25nw; arc=none smtp.client-ip=217.72.192.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1716107907; x=1716712707; i=markus.elfring@web.de; bh=mR4LJmey+5na5DaqpNGAQY1Gu3MobXSjLTQaXj5651M=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:To:Cc:References: Subject:From:In-Reply-To:Content-Type:Content-Transfer-Encoding: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=FdK/25nwCvjaX13KoqZoWlurT3IZ9dAoxgkegtddMSWYTyAPkUk7x//SUGcen6Lb s6lgMZRQ8N6FaKKD6uk1R9VCJgUPa/l8vtZtZwPLaUXeJrWHlfRBlyLLdQrpiIjTd A4ZYzrucF+hkGpCIeLbR7TlEf/yNBZrtfsLa5Kw4SsS+oQfas+HawLjpgNz8ujnqE bwBPuhN6ZfA0v+0AudY3+DwEW+AVkwJajuVlhG2lt6Z2eGpqC9G91CZet+MIZatf2 9NSWHmrjARBt97meKlK41stWWv7GQ4ogCtBAm0McHaWwNeaGIY4B8LIo6wAIbq2b+ LAPqqw2Ol9zpphyoMg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.82.95]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mvbiu-1sRnL32Qh4-014m8l; Sun, 19 May 2024 10:38:27 +0200 Message-ID: Date: Sun, 19 May 2024 10:38:25 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: =?UTF-8?Q?Alvin_=C5=A0ipraga?= , devicetree@vger.kernel.org, linux-sound@vger.kernel.org, linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: LKML , =?UTF-8?Q?Alvin_=C5=A0ipraga?= , Emil Svendsen , Andi Shyti , Bartosz Golaszewski , Conor Dooley , Greg Kroah-Hartman , Jaroslav Kysela , Krzysztof Kozlowski , Liam Girdwood , Linus Walleij , Mark Brown , Michael Turquette , "Rafael J. Wysocki" , Rob Herring , Saravana Kannan , Stephen Boyd , Takashi Iwai References: <20240517-a2b-v1-1-b8647554c67b@bang-olufsen.dk> Subject: Re: [PATCH 01/13] a2b: add A2B driver core Content-Language: en-GB From: Markus Elfring In-Reply-To: <20240517-a2b-v1-1-b8647554c67b@bang-olufsen.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:+6aU5u5VKwcLLXESSCJnF8xsuqpIE4g1lYcdN79aqgrSALLuexV j6Q5oFkmlN/KYjYzP7dplTs7qHuPeGQBbm7zkFL+9Z4rnhJxax6j5KVSpVitC/FZHwjfI6l wsh3pVpgGGnuOcIIaXbKVrvGQjEOd5kMwOUDKKiRSzPTKMfDZftdiap5yCPTMTfvbN7ViNr svwuIKbYz8wHYMxbZ8QIw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:QPkp+V2A4MU=;+NWHWxpxk3xHAm8+4xiGSlOB4tM 7WPwNZ9QuFxh0hJOGJNhkSGyMMS7iLRiBpNtAa8RNVGKSWNjJnv0aOIh9OrKciin8e6nRal/x Y1rOFQSpzVYl09hmuxnBO1eEK+wVx7Q7AXUZcyDXTHfKkiCThEv6+UcTG1sUjSOd4ub3vlyXh FmmPjsCqAjOPVjUaDzKkW4jc6Or8tT/6KoCSiaz3sdhFJcvDjlNeFOXHumT5TS2/2VgxyiZXF ejk6XR6qR5zHIRH4INdUXWMOJ1bBnEGD7AhjF/rkC5o6X2YjWdGzyfQs8bxgJQYmO6X8SyR9A vVNTWqRhVgkF5ghyKYp0uzLFBZISOZgQii/ThBxWv8NR1ZW6kW6PIIsBOFWtJNG15xnYNDjeR JCHfzHFpQSI6qHbytEA4IDRoPpOPildfBP/WXHiSIyhwRElDJ2iE0n5JKxlizz7P4MeM0WyWz OPXGlbh3TIOKMEyuNJCOdjO2c/H6mD+n/dV2F572A/Xvz7SodLy/YgYK6R3wqHzQvronbEJTx U5IXnAG4bAer+UfbUOWGa9FdD9MaxySPKbh61outhJubVL4svBXdSumGrjysEtyBZD3CF6gvW 1J6cTLwG0ULEe4FqtrmQA6reQNdQs4gznoZPnWr/rM0b1FkxEDQR7i/9lNltW/VejKorZrVcm WYtLC/PKJDhdpCKlqRFL9civ5Q6ltwAMxULKgZKkSz0NS8Jb6ZpUszJI+LUDYNr47/M2IWTDQ 4yquGs5L1GMJNWX5LvjnYkiJzrphbcGksTV41Y39NhlQMgkQKW+TW8mj5nFLPY/Ng8kLUZgTo +MfcBALkcdpdpW8z1HQaEnIkoImLtRzo1Fsd4A1kkJPxE= =E2=80=A6 > +++ b/drivers/a2b/a2b.c > @@ -0,0 +1,1252 @@ =E2=80=A6 > +static int a2b_bus_of_add_node(struct a2b_bus *bus, struct device_node = *np, > + unsigned int addr) > +{ =E2=80=A6 > + node =3D kzalloc(sizeof(*node), GFP_KERNEL); > + if (IS_ERR(node)) > + return -ENOMEM; Please improve the distinction for checks according to the handling of err= or/null pointers. =E2=80=A6 > + ret =3D device_register(&node->dev); > + if (ret) > + goto err_put_device; > + > + return 0; > + > +err_put_device: > + put_device(&node->dev); > + > + return ret; > +} Did you overlook to release the node memory after a failed function call at such a source code place? Regards, Markus