From patchwork Mon Oct 26 14:49:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grzegorz Jaszczyk X-Patchwork-Id: 11857435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 359C8C2D0A3 for ; Mon, 26 Oct 2020 14:52:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF0C222263 for ; Mon, 26 Oct 2020 14:52:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QX8hqWUh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HPYGaAAY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF0C222263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=i/htvQ5maHkrykXl0P7m57aNdSDAH9xiPYUKpap2pNs=; b=QX8hqWUhAgNhoMek4j/gIdoId3 LYGKVdluLWSls5uX4VYjWay7dhs9egHyym3FB8TF04mO88SzDHinocqDAYIZuE0BdvASbBSjgdoKf lU8euZJ4ciJ+sXo8N4EYi6rffntxeow9/oEkMJrzT/f4ygLnxIUTtToEikpXWry0uKr5qXK6IW+cL 8hOwBxD2mdLF20NUQzUgIb8e+R/+srpJaRU+9759VsZErqvbrlfBBIvTjHukitsRw2dpBF5Q2C59Z qdvNFmZtqVdPqJ5zwTJh1yal4oqXL6UuwKsMfhM+E/X99G7v+287TNi3PakfYQCuv1xkmaJmnsezX LyQfolVA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX3pj-0005bK-2P; Mon, 26 Oct 2020 14:50:51 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX3pd-0005Z4-Gr for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 14:50:48 +0000 Received: by mail-lj1-x241.google.com with SMTP id 134so9437666ljj.3 for ; Mon, 26 Oct 2020 07:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PjEF2KqOXKaLbNJ1lhobH8B17OERpDyB9/tbkI8C/08=; b=HPYGaAAYsjgalKpDgIX2K4tGtRw/UCJit+fZ2vH/w/3KbTGTyHCTu9Ut8j1kDVNWr/ jWPMbMCI5Q4SDNrCtUsDgNtwi8EzIsfQfseVbF1qwkFN/NKLoHYrv2dEG3yHzz8zjv39 Y6FMmuud2jQbBtE0CcLXDD1t1PcPlpBRd0Qy+eebOKZf09QI4JFWu2fc+TbQvEconMqf 2nWllRn/bsWfGqeEWY53gueWLNqKjcl8Ml5VzkIO0rX1cQBgpgqvGrFs10lVx4rwelW/ PS6a9bDnE2a3KRuX5lYlFYTfBZ8EhGrUjdHgCL1P3b2Lkoc5TQ69bb91DOrBPguTd8Qe dM8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PjEF2KqOXKaLbNJ1lhobH8B17OERpDyB9/tbkI8C/08=; b=SJdfP0MGI2OOvPtHh+l0HXwwHYMGCKYJ7P7RrJOchTOcHJ6gaq327hhCKJllpcMn8n t1cM4HKr4nTVckWwwifeSmBhXXefz5QARPkdGP4J216hoyMp27f1ex4EPBuPhH8PqQ4e eHBA/vfH92YJuKzapxcvxPNtePemVlbhwqOPA0BajqBOI83Z2xx1LG/mI7cjuHwwIXea EznSWrS5LksaQ2G1aZqQ5ehnWtZEXLqxBybXzrclTdzYu3eKIzkEShG8Ghx0dfsQz/WH bMZiDFEay+AsjI1a3s6kSZWVZB4yLDQdjZ85Vt5n7SW7GKXAWxPUBosYWP26Qh+DRPfb 8TMw== X-Gm-Message-State: AOAM533uAM2YljxQmuqy6nd/x2g0Bakfclz3eXERxq/6eyBfCfzI405/ PO0iIsfAhXsopuBcQ+0NvsZAlw== X-Google-Smtp-Source: ABdhPJzglLdj3k7YiObTfmoD5Y1+QYVfbtS03yxhQVEzj9ZlCLveJNoso6kvb2hB4j3HxFIpC4Yetg== X-Received: by 2002:a2e:9ccd:: with SMTP id g13mr6297132ljj.127.1603723842608; Mon, 26 Oct 2020 07:50:42 -0700 (PDT) Received: from gilgamesh.semihalf.com (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id l129sm1061301lfd.279.2020.10.26.07.50.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 07:50:42 -0700 (PDT) From: Grzegorz Jaszczyk To: ssantosh@kernel.org, s-anna@ti.com Subject: [PATCH] soc: ti: pruss: Remove wrong check against *get_match_data return value Date: Mon, 26 Oct 2020 15:49:43 +0100 Message-Id: <20201026144943.30821-1-grzegorz.jaszczyk@linaro.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_105045_969813_7421BCE6 X-CRM114-Status: GOOD ( 12.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: grzegorz.jaszczyk@linaro.org, praneeth@ti.com, santosh.shilimkar@oracle.com, linux-kernel@vger.kernel.org, tony@atomide.com, Wei Yongjun , linux-omap@vger.kernel.org, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the of_device_get_match_data() doesn't return error code, remove wrong IS_ERR test. Proper check against NULL pointer is already done later before usage: if (data && data->...). Additionally, proceeding with empty device data is valid (e.g. in case of "ti,am3356-pruss"). Reported-by: Wei Yongjun Signed-off-by: Grzegorz Jaszczyk Acked-by: Suman Anna --- drivers/soc/ti/pruss.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c index cc0b4ad7a3d3..5d6e7132a5c4 100644 --- a/drivers/soc/ti/pruss.c +++ b/drivers/soc/ti/pruss.c @@ -126,8 +126,6 @@ static int pruss_clk_init(struct pruss *pruss, struct device_node *cfg_node) int ret = 0; data = of_device_get_match_data(dev); - if (IS_ERR(data)) - return -ENODEV; clks_np = of_get_child_by_name(cfg_node, "clocks"); if (!clks_np) { @@ -175,10 +173,6 @@ static int pruss_probe(struct platform_device *pdev) const char *mem_names[PRUSS_MEM_MAX] = { "dram0", "dram1", "shrdram2" }; data = of_device_get_match_data(&pdev->dev); - if (IS_ERR(data)) { - dev_err(dev, "missing private data\n"); - return -ENODEV; - } ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); if (ret) {