From patchwork Mon Nov 7 18:17:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 81157 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1150399qge; Mon, 7 Nov 2016 10:19:14 -0800 (PST) X-Received: by 10.99.244.17 with SMTP id g17mr617201pgi.80.1478542754212; Mon, 07 Nov 2016 10:19:14 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h67si13922070pfe.48.2016.11.07.10.19.13; Mon, 07 Nov 2016 10:19:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933349AbcKGSTK (ORCPT + 27 others); Mon, 7 Nov 2016 13:19:10 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36636 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933233AbcKGSSW (ORCPT ); Mon, 7 Nov 2016 13:18:22 -0500 Received: by mail-wm0-f41.google.com with SMTP id p190so200084454wmp.1 for ; Mon, 07 Nov 2016 10:18:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TUGkQCSCoT0uZ+/ZU1i/xGjWMWPMAjhXoMBHIu+3NrU=; b=iz08iksadUXfJPYBg5SR6n0df2pOZf9opZ0XcxXRsDWqNbffiFs4Hr9KHRM/VwHi9L Mx0yMJMy/lcjUC+GLNOYAxbUHoAQRJZc5blN0dQrcJfwq1xPXNcddK5XxdOhjcZ7ioe8 zrJsPfxcdcbZ3RgXjYeXqiuGKu9pRia/TtF2A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TUGkQCSCoT0uZ+/ZU1i/xGjWMWPMAjhXoMBHIu+3NrU=; b=LF92kEa6SnQ7w1VHVAT9hoew5qSRst9GViLA5soMSd9hKLlnXdH/G+pWqeFOOYqKbX QMMKC5jn5WjgC+jKx6LzqZJrzQ4+avTI4qq0gebH0QBt3jFLztARvc9C0UROVbznCiVa 1tTGnFLnPrBW4wMvVkhFaxYIYjW89+uEalD3bMGOkc4BFHJVb8sJot8GRBZZiml0oQOR JlKdrRgiNfDBB4wxHJHTfFgibVQ2dKPHI42USnFRvpZnmxt4JChBgATvyWCBcZ8c1NsA yG9btQ9ch35ERXTG3X8Eq8Db2X9psn2JnGga4fFpGRKkQMnV/rcQ5v01PscTofCOJjkS r7Tg== X-Gm-Message-State: ABUngvf0yyyRSwO4mPZgKHL3TvWLmsDezWluL2CV8leSfUgFRkUzXrfmTcMnKX0PzD1OdqZ7 X-Received: by 10.194.116.225 with SMTP id jz1mr6759840wjb.224.1478542700823; Mon, 07 Nov 2016 10:18:20 -0800 (PST) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id c4sm14921903wmh.4.2016.11.07.10.18.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Nov 2016 10:18:20 -0800 (PST) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, bjorn.andersson@linaro.org, vinod.koul@intel.com, ohad@wizery.com Cc: peter.griffin@linaro.org, lee.jones@linaro.org, dmaengine@vger.kernel.org, remoteproc@vger.kernel.org, Wei Yongjun Subject: [PATCH v11 13/14] dmaengine: st_fdma: Fix the error return code in st_fdma_probe() Date: Mon, 7 Nov 2016 18:17:44 +0000 Message-Id: <1478542665-17089-14-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478542665-17089-1-git-send-email-peter.griffin@linaro.org> References: <1478542665-17089-1-git-send-email-peter.griffin@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun In case of error, the function st_slim_rproc_alloc() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Acked-by: Peter Griffin --- drivers/dma/st_fdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c index 232d354..bfb79bd 100644 --- a/drivers/dma/st_fdma.c +++ b/drivers/dma/st_fdma.c @@ -792,7 +792,7 @@ static int st_fdma_probe(struct platform_device *pdev) } fdev->slim_rproc = st_slim_rproc_alloc(pdev, fdev->fw_name); - if (!fdev->slim_rproc) { + if (IS_ERR(fdev->slim_rproc)) { ret = PTR_ERR(fdev->slim_rproc); dev_err(&pdev->dev, "slim_rproc_alloc failed (%d)\n", ret); goto err;