From patchwork Fri Aug 9 10:30:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 11086173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52CF2112C for ; Fri, 9 Aug 2019 10:31:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41C8828C69 for ; Fri, 9 Aug 2019 10:31:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AB9928C80; Fri, 9 Aug 2019 10:31:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6741228C69 for ; Fri, 9 Aug 2019 10:31:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6D7CE851; Fri, 9 Aug 2019 12:31:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6D7CE851 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1565346710; bh=CXMgqA5lnYc86Yz4PuozxFzNkU4HnwiIl5wUX/9qFsA=; h=Date:From:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=i1VtHTW9ceYHWs7/tVvFamvIRWLKfuPD5E0oQnenMRz2g2axIi4xK4fLYIk5djbcv 0WovwRezX/8KyyVdzJfG4qlRDwtxgW1TbNOfa4pNfp0qhfXANgC9Gl53KWA6dJwX4y jg1g3+zyyNZvNGTuimRo92nvl8DWEPZ+/kX3M/xM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DB2FAF80391; Fri, 9 Aug 2019 12:30:59 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0EC1BF803F3; Fri, 9 Aug 2019 12:30:52 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E082CF800E4 for ; Fri, 9 Aug 2019 12:30:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E082CF800E4 X-IronPort-AV: E=Sophos;i="5.64,364,1559512800"; d="scan'208";a="316007832" Received: from portablejulia.rsr.lip6.fr ([132.227.76.63]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Aug 2019 12:30:47 +0200 Date: Fri, 9 Aug 2019 12:30:46 +0200 (CEST) From: Julia Lawall X-X-Sender: julia@hadrien To: Peter Ujfalusi Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Liam Girdwood , linux-kernel@vger.kernel.org, Takashi Iwai , Mark Brown , kbuild-all@01.org Subject: [alsa-devel] [PATCH] fix odd_ptr_err.cocci warnings X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot PTR_ERR should normally access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: 62c9c1442c8f ("j721e new machine driver wip") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://github.com/omap-audio/linux-audio peter/ti-linux-4.19.y/wip head: 62c9c1442c8f61ca93e62e1a9d8318be0abd9d9a commit: 62c9c1442c8f61ca93e62e1a9d8318be0abd9d9a [34/34] j721e new machine driver wip :::::: branch date: 20 hours ago :::::: commit date: 20 hours ago j721e-evm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/soc/ti/j721e-evm.c +++ b/sound/soc/ti/j721e-evm.c @@ -283,7 +283,7 @@ static int j721e_get_clocks(struct platf parent = devm_clk_get(&pdev->dev, clk_name); kfree(clk_name); if (IS_ERR(parent)) { - ret = PTR_ERR(clocks->parent); + ret = PTR_ERR(parent); if (ret != -EPROBE_DEFER) dev_err(&pdev->dev, "failed to acquire %s': %d\n", prefix, ret); @@ -299,7 +299,7 @@ static int j721e_get_clocks(struct platf parent = devm_clk_get(&pdev->dev, clk_name); kfree(clk_name); if (IS_ERR(parent)) { - ret = PTR_ERR(clocks->parent); + ret = PTR_ERR(parent); if (ret != -EPROBE_DEFER) dev_err(&pdev->dev, "failed to acquire %s': %d\n", prefix, ret);