From patchwork Mon Oct 17 16:46:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2439 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1BC374200B for ; Mon, 17 Oct 2022 18:47:17 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id b8-20020a056402278800b0045d410dec69sf5731332ede.2 for ; Mon, 17 Oct 2022 09:47:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666025237; cv=pass; d=google.com; s=arc-20160816; b=IiKlZ1BWwScs/J+81yp0IgSLNv/l4gbOCadxZ8zTgKkHjzOYDCbuOp8urEt2YhsX/T clj0x+YfTweDSfc5ltNOUASX+vF6oQyUS0+b9WR2PZTCZT2S7d5obVaa72OnY93lOm8P cZ+0aKCeHWMOytfeTQdEC2HcnzM2pljj67+eMP1W3zDqyjJTg64D8Oy1aTDxTtO1ByZn 4O91u+cERKhih8Srzt210qFo77PzJOmoxg1mDLSiMBzj9mfZUueP6t5/zXxdQmFq5EIQ vLLNG5k7c9+3CSl6s5n8gy8AQhGY80DmabP09ijyZ5zMufO7b4KvR9zCQsJdCs0+hsaF m42w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=Ry5tn/YcHRBPB1q6Za8LzTCEQ8/QR/c96DtTZSCK9lc=; b=METLQpnacMI8WVvOGFdtM9+16Hq7s8DxqJsduwSK8Poht9mvRParMisezBC7h1yCW0 ye2HbbEwjivqvY4k4GD8sb2FCnxVlmNzx9fxr+IsVVJxkcpB6dxZP3v1VtT44FppXBJa bqHoAjmlgJZ60OxdEd3HJYoOo46SHro9eVEjA5fkDvvB7kj/PM36ZYmbW/sx4tMfidUx S5f0WCtMCPh3OTlhxpa4xv6Bihl9h59tpWIg/R2LSBh0y9a4JueV8fTrIVpzH3YcrSGB J1dTfgBnrrGXhUT205lMEOChAVJI6U9wBhkAZIPHEmjk833zPHDItjBQe0ohJ4rX19Rh rZhw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WLhZOoL0; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=Ry5tn/YcHRBPB1q6Za8LzTCEQ8/QR/c96DtTZSCK9lc=; b=E84Pp98YUo9aQMiR5+OIP0/dlR4VdaiImIyIvkwqYYDstg5kgJtFZTZiuRQwDfoCdw FuZdfhiPiTC8soW0AB810d+nEOe+iL6DUpcupwHad/8UaEa2Ua7het2wQzmW3u38pKCp UDYV8UipiNXJOk5QELCGaVTPhWDyIMWGomgbY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ry5tn/YcHRBPB1q6Za8LzTCEQ8/QR/c96DtTZSCK9lc=; b=aVX72s0lt1G98wFKuvHxjKwC+zndusG2JnL0AzBJsYcbjBoHa0xzuO1orpmfpK6eHs PpCg8u+V9UO0YUMQywMpfpElMk1wqNoJ5HFR1p5PoWmCNz8faaKfQYEaq9ZtQazNHVgk K71wjOIJHB2BgIzlDoNzYCppM9pyF4k0aszyyTCcHDq46GK5eP/tiXLiDO/owfIKYb9g v7e2vC9xhXqDj3NU3/50XjXXFMPJPNkLlzAsz6F14GD5fd1cqDecxE1377m5vbjLbkJw VtH2wEKTQWiHieS9OQnkD4aSwG+N5vMD66pTpEsTc1/tgQxCTpwFOGlFgW+o0rOiBes0 Nqrw== X-Gm-Message-State: ACrzQf1YqZNWNy5KGc1Y4fjTF5m691GZF++v+hDvbW8JWpZE0MuX/ZK4 ikVxyK1rbSWl3JkCgiUPzNCMa1Cu X-Google-Smtp-Source: AMsMyM7oZTSSucOhHViI/opmFkMDXwHNd9Bhejvl0vWi0bF17HFqEUwcUt1UQhRLhst5HbnOuswRYw== X-Received: by 2002:aa7:dcc5:0:b0:45c:7613:65f6 with SMTP id w5-20020aa7dcc5000000b0045c761365f6mr11492534edu.142.1666025236679; Mon, 17 Oct 2022 09:47:16 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:c301:b0:783:b20:46a0 with SMTP id s1-20020a170906c30100b007830b2046a0ls6052801ejz.6.-pod-prod-gmail; Mon, 17 Oct 2022 09:47:15 -0700 (PDT) X-Received: by 2002:a17:907:6288:b0:78d:ab30:c374 with SMTP id nd8-20020a170907628800b0078dab30c374mr9481709ejc.266.1666025235505; Mon, 17 Oct 2022 09:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666025235; cv=none; d=google.com; s=arc-20160816; b=XFwVWNTx3kmf45gSY4ktI6KNZhneez8cz3Ym/w7n0wIMAgFQfNFoNTCgF61w/0GRB+ hlHpctn6V+fXb9HD/peW4pjZzoEN1qGeYQjiTefHZFYIytVA/ZqiWtT47+0FQL8u/431 fm41LadHlSbJKnL2sBMhc8oTESU/LzDwNG59tCwMyOiY35kydWiAqq8zaoGjebjaYi+c J0Eae5c5JZzicKc58xnx1S1aTBsMP28sXTTCXQOY9MZkYJ0dweVL2OOadT4Roh+46RA6 cyiAEc5wImb7s3OnTz+k+7xccIV2wcuONicby/MbdMaxV+mdevg10wwxZvX8kxsX5lVg 8l+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=gVq1slC8WyteXvk7RgIypCJejBcKboJNQiDOlth57NM=; b=CDBmUIL/K5B8f+pj9MoEfdvL0kM3u2vQYzRuG1X72eQPtfmruzIQR5xr8MMgylXti2 DBr+/jk+PTyl6pDJ5cVcYV0uFG3To1bwzdyZcjv9PRZZKEiVGf5m50hruj59DDgViA/k KO48tv8d8HMLsYTcPPO2M9dlmdiAu7gCkpZjlj/VWJg009dkGvjYzglLL+ZhxwGbbDsn wWtIf1MXYGNpjuAxJXstU5k0x3JsYRHOYR6YR4DmvSCeh01N4eaZ035BYht1H0I1rgoS nQ691D/esLE1NmkSp/qiA+aONc2Ab+1xs//LXj/z93/R7sLyD3tIgPxPlOVlm3LjHeZl 9hmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WLhZOoL0; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id k9-20020a508ac9000000b0045810194e5bsor4884368edk.66.2022.10.17.09.47.15 for (Google Transport Security); Mon, 17 Oct 2022 09:47:15 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6402:2706:b0:45d:aaae:e74a with SMTP id y6-20020a056402270600b0045daaaee74amr3392104edd.72.1666025235279; Mon, 17 Oct 2022 09:47:15 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-244-101-110.retail.telecomitalia.it. [95.244.101.110]) by smtp.gmail.com with ESMTPSA id va30-20020a17090711de00b0078d61c5db0asm6316887ejb.49.2022.10.17.09.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 09:47:14 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Greg Kroah-Hartman , Michael Turquette , Stephen Boyd , Tero Kristo , Thomas Gleixner , Tony Lindgren , linux-clk@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH] clk: ti: mux: don't free `parent_names' on kzalloc() failure Date: Mon, 17 Oct 2022 18:46:46 +0200 Message-Id: <20221017164646.4193618-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WLhZOoL0; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Although no operation is performed by kfree() on a NULL pointer, it's however suboptimal and semantically wrong doing it. Signed-off-by: Dario Binacchi --- drivers/clk/ti/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c index 46b45b3e8319..1f924db2ad98 100644 --- a/drivers/clk/ti/mux.c +++ b/drivers/clk/ti/mux.c @@ -182,7 +182,7 @@ static void of_mux_clk_setup(struct device_node *node) } parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL); if (!parent_names) - goto cleanup; + return; of_clk_parent_fill(node, parent_names, num_parents);