From patchwork Thu Jun 15 10:53:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13281061 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31198EB64DB for ; Thu, 15 Jun 2023 10:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dsRFi1gDNM3p6wUYPuAEac9Y/f4Z3SydOnG5Iey6cNg=; b=rj7HqWn07iCl0y 4MCKnmSclkFkn7y1LrX3RIvyjbOtiRUy2P3xRLZ73atK/pIRoLhPzAjUDPJYOprvlEtZu/TnKA4fQ t58qngwDD88cl1ZgAc7NF2izhf3Z6wPbOXEAYKrvwxWKFooL+gjc7gSUi0xx0lfYg6FvDhC4EVZUF MqB+KBR9YxeLgANC9Et1DJTPnMFLg4MJ1/zgDyv9E4Gydp4mCRyYi6AxjC1v9TSj109swziqU5wpM KTq2E02t8KEW8rfDeNhSn0Gi9bTt7uG9Pk7NFKDUHLKrZixMIMicFozzUhGr2XMyNDStXQScQf3r2 liUqhz6QmMc/8qMK5SUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9kc4-00EcOJ-20; Thu, 15 Jun 2023 10:54:00 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9kc1-00EcJT-0h for linux-arm-kernel@lists.infradead.org; Thu, 15 Jun 2023 10:53:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1686826436; x=1718362436; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VPdNiKlMcAsdznlaYrLTBJ/HZaawdS7AROqbfq7YFK0=; b=1A0hTatNF/Y+lmfVHh95BToHj/y0DJp92gwM2bpSHzaDaRYQk84XDpoa dBqqnx+JWm59QLp+WD5cYn+iNbvAMp85qtqkuhXR+AMaEXUbvV1KkqZmB fFK9lRm+VD5nAp/DXkYgnmznt5/uEIMsYcHmTgpfxQloKKe60pP5xi5vr ZKEE0HiIZLNepbBcpv4E39S6OWAddq3vuAhJ5Wrpojbo0j1KF2u5d6F6z qKGI21iIhppu1IKSYFV9qDZjGiFR5Tcje/hC8RPG4NKrz/XjTb5TYZy2+ EBUhhnnkl4gZBf0hips4RQmqg2r1IWA14/tR5h/WpDR9f3VsOeH653ChW w==; X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="218006652" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Jun 2023 03:53:51 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 15 Jun 2023 03:53:51 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Thu, 15 Jun 2023 03:53:46 -0700 From: Claudiu Beznea To: , , , , , , , , CC: , , , Claudiu Beznea Subject: [PATCH 0/3] pinctrl: check memory returned by devm_kasprintf() Date: Thu, 15 Jun 2023 13:53:30 +0300 Message-ID: <20230615105333.585304-1-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230615_035357_292194_17CF1D97 X-CRM114-Status: UNSURE ( 7.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, While browsing some code I noticed that there are places where pointer returned by devm_kasprintf() or kasprintf() is not checked. Thus I've tooked the chance and fixed this (by updating kmerr.cocci script, changes published at [1]). Thank you, Claudiu Beznea [1] https://lore.kernel.org/all/20230530074044.1603426-1-claudiu.beznea@microchip.com/ Claudiu Beznea (3): pinctrl: mcp23s08: check return value of {devm_}kasprintf() pinctrl: microchip-sgpio: check return value of devm_kasprintf() pinctrl: at91-pio4: check return value of devm_kasprintf() drivers/pinctrl/pinctrl-at91-pio4.c | 2 ++ drivers/pinctrl/pinctrl-mcp23s08_spi.c | 3 +++ drivers/pinctrl/pinctrl-microchip-sgpio.c | 3 +++ 3 files changed, 8 insertions(+)