From patchwork Fri Aug 30 09:02:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 1155784 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46KYSh3wSsz9s7T for ; Fri, 30 Aug 2019 19:04:20 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="Uw+aX94S"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="j8QZHO/1"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46KYSh12GQzDqVr for ; Fri, 30 Aug 2019 19:04:20 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.26; helo=out2-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="Uw+aX94S"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="j8QZHO/1"; dkim-atps=neutral Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46KYQp6VMhzDqB5 for ; Fri, 30 Aug 2019 19:02:42 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7F1232202A; Fri, 30 Aug 2019 05:02:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 30 Aug 2019 05:02:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=N+/xHfrW3aULX QCqVybged8XEa4ya5xZpQyzoYwgBTM=; b=Uw+aX94SOlLPM1U3DFp/+EEDXWbdA kTJ82sO4tBCBPLTJU5988b+gpOhRAueukhiwqjwpaJDsOaJmPvq5Qn36QG/7Sacf c4LvGYie0iYWpKG7LZT2l2GJpom12BEOeLksZs7w/DPLOgY5CG9WKpxXTFNRzist uEGbKUIOMv/v6SSPakDiO8V9/vmc6Jk3vsEdFCioGunJSP7qE7thmuwM/X2v9R4q LeCeX6218zmW5aqw6HSJ06PGZsa/tIjx/nkrmDS+JV1I6uN+ySDWGxUFr4s4a09H f3fmOh7wpkNytTC7XQQ4QqtjhwCNsWo72xIGlY7NbJQbSjWaDuzGDUVCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=N+/xHfrW3aULXQCqVybged8XEa4ya5xZpQyzoYwgBTM=; b=j8QZHO/1 NE1knNdBbk2JRWPFraUjEbkxnqGoWnOMKG05BQ9PNcWhzk4k8nn4SLyGPex+AK61 MIZZOE/6ewzyMjyA4CquLBZmnK2TcPa5KlPix+EIu8Z7e12OL5s15XqYU/rvJkmW nHcRUyet1OlXiooogRw1SA2djUb/7lzdea/EY/8CWkPlWLRlPkJKfZaILgaJkeVD zW8KEqqEZIZZvhamjXHbmnE0P75T1v9N4c9V2hGRrJywkQjbpxtjmY2CyQjfhjs8 FkIpHlBu/aD8/lVCJYOXqRd9rB5W7pPvhUZvzgGyMojRbJzACOBn5/IMQgvDDKux yj/m+R2zZL4Tqw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudeigedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetnhgurhgv ficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucfkphepvddtfe drheejrddvudehrddujeeknecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfies rghjrdhiugdrrghunecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost.localdomain (203-57-215-178.dyn.iinet.net.au [203.57.215.178]) by mail.messagingengine.com (Postfix) with ESMTPA id 6DF14D60062; Fri, 30 Aug 2019 05:02:38 -0400 (EDT) From: Andrew Jeffery To: openbmc@lists.ozlabs.org Subject: [PATCH linux dev-5.2 1/5] mmc: sdhci-of-aspeed: Fix return value check in aspeed_sdc_probe() Date: Fri, 30 Aug 2019 18:32:40 +0930 Message-Id: <20190830090244.13566-2-andrew@aj.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190830090244.13566-1-andrew@aj.id.au> References: <20190830090244.13566-1-andrew@aj.id.au> MIME-Version: 1.0 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Wei Yongjun Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" From: Wei Yongjun In case of error, the function of_platform_device_create() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun Reviewed-by: Andrew Jeffery Signed-off-by: Ulf Hansson (cherry picked from commit 7b7de08a14b59d45cc4720bfb21732063ccfc8f6) Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley --- drivers/mmc/host/sdhci-of-aspeed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index 8bb095ca2fa9..d5acb5afc50f 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -261,9 +261,9 @@ static int aspeed_sdc_probe(struct platform_device *pdev) struct platform_device *cpdev; cpdev = of_platform_device_create(child, NULL, &pdev->dev); - if (IS_ERR(cpdev)) { + if (!cpdev) { of_node_put(child); - ret = PTR_ERR(cpdev); + ret = -ENODEV; goto err_clk; } }