Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp479024rwd; Thu, 1 Jun 2023 02:59:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uc5d6itKicP1v8UAwZbCUOrulxbQW2/wU9jjZqBlu/EwMeVkD5SZnGejEqDyp54Ypx561 X-Received: by 2002:a17:902:b081:b0:1ad:f407:37d2 with SMTP id p1-20020a170902b08100b001adf40737d2mr7292510plr.5.1685613548335; Thu, 01 Jun 2023 02:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685613548; cv=none; d=google.com; s=arc-20160816; b=Gsh4GjHyJ/vM666UUeACapaPhjJKLN6Ca2j6diNtxqhbAo6Iv5LqhBnmWt81PG5rrp 2XTIzlNn0+MKuFEcdBjfofyaNqsQLEROjNfiH/2ejstll23ylspECSHmeqMwYvQG/ybH nZnFZNWlqU+5Rxz4LqG1NIdSoQzy2wlszu+i+nOqGUFeJ7EYyHdBXPMRWm12eJaHtN0U /zjdtICoAZRAMoqaa8ZdPe8j3Vf7JXmyWHjBe3Nzyq4assFHfpOYpUd4Fj4RC9L8zlON G1PBjFBqUEH1iIMNIIg8s+AhLbZOjN2rMr0FfP3egCOMCgVErXOFqjY+gicwqGnpCoWg 5iCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=rC5Mt14VowRy48GhWbY/bbPfnc3e4XQZGJKCwvTP6ko=; b=hvnDNMUOJu2Y5XmnqSVguWp4JThUMQ8WlttMFanAfh0D/s2qwDFe3V2IlSxXIfQ9DF UDVRgaI6gzwB8ayBSNqMIPQCZ/q1CFOEJqBJMDUtcMZKwFNQrH4E49YDzsSDDVDOC8K5 g5u+7CuMu3/NaoCFCecsM9Q5C2yLDYGSPUvrFZoQP/5G6vAva4JMhLwov8XXkf+a9TvR no9Vd6CtUljL5GbKia98kwswf8einlBcZfc06/ZOrpAul3r0luzW02cxdPpRPNqoI4Nj HFBbsz83GqVPeklQHOiGf3azgJTi+rzWTxasgb/MciDY1RT9loPDygsUvrjnuwyVdGKt NUlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fmuq76LB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a170902748a00b001b035052ec8si2431008pll.81.2023.06.01.02.58.54; Thu, 01 Jun 2023 02:59:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fmuq76LB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232507AbjFAJj7 (ORCPT + 99 others); Thu, 1 Jun 2023 05:39:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232915AbjFAJjr (ORCPT ); Thu, 1 Jun 2023 05:39:47 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC3D210C6; Thu, 1 Jun 2023 02:39:21 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-96f7377c86aso82331966b.1; Thu, 01 Jun 2023 02:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685612354; x=1688204354; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=rC5Mt14VowRy48GhWbY/bbPfnc3e4XQZGJKCwvTP6ko=; b=fmuq76LBD/BKMfC3X4c2kFRL8sTgZbczaJn52qRjd8YtoPzFDjCEUBSzpNujsGujFy XivSodLO+1PFuPikCZ6/WWYhw6Spa1d0HkH7WonfCbAfeUSEcGOAtwrEv5J9hWalGlEx VA6zd7rWZKjii/15yOj6sz3UkwI4isdyDBbSB2ZVydBC/frwV0O6gFLz8QXobXAojT5P lQFNhZU3tONYzX6mZDcS9g6TsvAd8XoAl39xDPdKNRtpaVp6h6bh9zxWVgrZrtxVpGfU fyv361XSbQfjBP9JzSkZeUWLU/hBf5Xt7vJO2PRrYK/PiWICFFWXkOT9nf9bfu6/tAj9 lb4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685612354; x=1688204354; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rC5Mt14VowRy48GhWbY/bbPfnc3e4XQZGJKCwvTP6ko=; b=E3TC6O9fDcdWA8bxdPfC3juNIoiAAP7cNpLxU2v/qyowtEYnoa4q9+w3iCSz9Fxg0b DR3FWmjhuDzFD7kXdTX6E4u9y7pdXc6L1XBgnsH2TZYc9wvOi+b2eFkwIpw5yM/7c5Po kjrxK/4g0OeZR9dSMtzbKEX2CYrZAHOTV4VHlI/ZF6HDgqJNTHE71JLhJxxJJ8QlwpXR xicKI5lh9MTmfGbRkWNQ2IwJv/MiyOUxSKHKRaanJmp0i3dIXMjmNAnX3JH80fGbJyuX yWT6MJyFDV1x6lMZVBEJnGRuqLUaGzIbeIqyS9MHAzTtSLFx4A1WLuRzOwnxHrhw9BEP v86Q== X-Gm-Message-State: AC+VfDx7L1Oc/SKb1c2wuSTcQQN1xzUUb/waFxnFQr4+kWihsn8dd7SW YgYkgA08lMD7apgdultUh1M= X-Received: by 2002:a17:907:3fa8:b0:973:93d6:189f with SMTP id hr40-20020a1709073fa800b0097393d6189fmr8278145ejc.61.1685612353929; Thu, 01 Jun 2023 02:39:13 -0700 (PDT) Received: from orome (p200300e41f305300f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f30:5300:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id l2-20020a056402230200b00510d110db58sm6826402eda.80.2023.06.01.02.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 02:39:13 -0700 (PDT) Date: Thu, 1 Jun 2023 11:39:11 +0200 From: Thierry Reding To: Claudiu Beznea Cc: jckuo@nvidia.com, vkoul@kernel.org, kishon@kernel.org, jonathanh@nvidia.com, nkristam@nvidia.com, linux-phy@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] phy: tegra: xusb: check return value of devm_kzalloc() Message-ID: References: <20230531073950.145339-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SzK0EoW6aJTj4hu0" Content-Disposition: inline In-Reply-To: <20230531073950.145339-1-claudiu.beznea@microchip.com> User-Agent: Mutt/2.2.10 (2023-03-25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SzK0EoW6aJTj4hu0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 31, 2023 at 10:39:50AM +0300, Claudiu Beznea wrote: > devm_kzalloc() returns a pointer to dynamically allocated memory. > Pointer could be NULL in case allocation fails. Check pointer validity. > Identified with coccinelle (kmerr.cocci script). >=20 > Fixes: f67213cee2b3 ("phy: tegra: xusb: Add usb-role-switch support") > Signed-off-by: Claudiu Beznea > --- >=20 > Hi, >=20 > This has been addressed using kmerr.cocci script proposed for update > at [1]. >=20 > Thank you, > Claudiu Beznea >=20 > [1] https://lore.kernel.org/all/20230530074044.1603426-1-claudiu.beznea@m= icrochip.com/ >=20 > drivers/phy/tegra/xusb.c | 3 +++ > 1 file changed, 3 insertions(+) Acked-by: Thierry Reding --SzK0EoW6aJTj4hu0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmR4Zz0ACgkQ3SOs138+ s6GGHBAAtshFSZ3QcyCHwyKBFbTQGF3yAnYM6G6AkNLNP6wp3gPNnFalHh5khzoz uOWAroLAJrkmk9BLwwonPFbwdirJW7tkJzhc8Ed2wuEqpHoqnri26zXJerzUIVqZ nRSzIqgLVLZberDqE7wtWORJe/DEvJZm3nVi0Fm9UvpUUDaQERId4dznkMz6RD8K 8Ir7AOy8UubrL3eWUO82suI986h8P7wSSF5bf99TChpzwkamiFV/HtbXUmRez/Ve JdBpS7UyflCycZc/5toHvRMZiOBnUbeZKqtApRJ6P/ef5Yc0uEd1TcIkq5EPhNw2 ik8PO1g9Uktykvr5nJG13uUj11ESd8avT5yI/+PL7y4g/l5qWFWxtH84chbrZD+5 0NcPWcoZqtP9wMvzi347zU+nD4TVhRPU0F9ATCSYr7LbKrbmrJSpb7FZNTPpkx2b YLSni3X+d3Q74XxhP9lS+0G1gd3G4upCdD0QwAEVAbvk5iMMVPCknzibariu5mfI 7gMZTBwynWXFV8F1NFiIhvFPU+0+u+lPys+hi6tMoP9Ly4d/unJqQxJ3MAmU4PT8 3xpMQacse1AK2qYuU6HRM8KYRC7rSZw4syOdW5Tf4w//cC89IDWKiu2w3FNQ8KSo Hs/baYySpA5iUCFBHnMXhyQnr3hIjwdeZPD/cH15VozAKLLdPP0= =qovl -----END PGP SIGNATURE----- --SzK0EoW6aJTj4hu0--