Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5645012img; Wed, 27 Mar 2019 12:20:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzO9QX17RRepHwXOeR8V+rLMbcF0QIgAo4BuNzdh5vm4F/l4iPQIirofjK/ShA0AXAxvEam X-Received: by 2002:aa7:9090:: with SMTP id i16mr35820739pfa.85.1553714412647; Wed, 27 Mar 2019 12:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714412; cv=none; d=google.com; s=arc-20160816; b=ldCjVUcgfgooTm/dJTmC5ucpnbWjtjulzdz44Vrj/BLP6xyWku7N2f8IMnbF43fHkR Qan2JDwMlP9b0dynaoZ/r2ZyWn/2n2iGS2BUimh9j6qBr4BX/5/po/AfKwTeltm+sjhv 34g5KyMbbQuLB+jOkpW+Iy2GAL5Kk7OeQgGoLj3vY/7ghey2gvXAc4gyq9UCjXXVgPjl xexWAKPR4WLR8ipIuMUvqzgC2ovE3R5hdoHPP+vYcrjvopmSs+6+Ub7QzBoiVXi09PwC DtPXlLfpdrY0aHb0Cfu4QZ7q/56yVcCSapgCgHzXlv2F43e+Dy/lk5FXhJNx77Ob/p9d Gjjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t903Y4lYxR7aqjbTXA1YxmT1V72qizTC29GM+SUW1Ic=; b=GZ+hJK0bMhRrCk6y6KjAKq4sUU09LKc7+Nla7uZdsBHVjo9zDkzMDeBVZuq6kGDQuh BOJSnzGZVdI45+zhmRAvXJNqn2GLfI5//VBw0cLFCEfIPxQqBhC22qOxCAvqt2naRG5f ZuBi5oHD8y/7/p7qQvA6Ifi4kUbN9lqg1CQ72ztZ4No1dYO+GtFo0u8QyFD1qp76d1Yq HEiLboXIGXYBEMm1ZVOAjbstH8M8oswQjuLZnEUEp042BYf/nusFmjRgzobxif6hKCon Ioe2nbQzHky7BEyH3LVAhqRDr/vb+Bs5eIPwXC+jZ4qcH/9tXv6vMbXAYh77utLwlMqm UJWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rJOiakgw; 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 sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h85si19296221pfj.88.2019.03.27.12.19.57; Wed, 27 Mar 2019 12:20:12 -0700 (PDT) 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=@kernel.org header.s=default header.b=rJOiakgw; 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 sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388245AbfC0SHs (ORCPT + 99 others); Wed, 27 Mar 2019 14:07:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:49656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388241AbfC0SHq (ORCPT ); Wed, 27 Mar 2019 14:07:46 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C23F321734; Wed, 27 Mar 2019 18:07:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710065; bh=WwdVZgGGO49Ql0Yky44C0CnNOZ0SpZ/J/QDO9zN7mWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rJOiakgwmlGzMGivcHkMHiCCoa06NcbCRYYUBO+xXdg7E9no4pG2vFYJu6Qh2ix9u 10MYk3GhdPpqZl3ojEn84yB/6ORCaNrqjAMRd4ZI13ci37kUb1i+exPH6tlJIjnDHt /15lfNgOI0fkzIwjtj+O93sD/WC0nCwDinxuJyRg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Stefan Roese , Mark Brown , Sankalp Negi , Chuanhong Guo , John Crispin , Greg Kroah-Hartman , Sasha Levin , devel@driverdev.osuosl.org Subject: [PATCH AUTOSEL 5.0 181/262] staging: spi: mt7621: Add return code check on device_reset() Date: Wed, 27 Mar 2019 14:00:36 -0400 Message-Id: <20190327180158.10245-181-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Roese [ Upstream commit 46c337872f34bc6387b0c29a4964f562c70139e3 ] This patch adds a return code check on device_reset() and removes the compile warning. Signed-off-by: Stefan Roese Cc: Mark Brown Cc: Sankalp Negi Cc: Chuanhong Guo Cc: John Crispin Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/mt7621-spi/spi-mt7621.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c index 513b6e79b985..e1f50efd0922 100644 --- a/drivers/staging/mt7621-spi/spi-mt7621.c +++ b/drivers/staging/mt7621-spi/spi-mt7621.c @@ -330,6 +330,7 @@ static int mt7621_spi_probe(struct platform_device *pdev) int status = 0; struct clk *clk; struct mt7621_spi_ops *ops; + int ret; match = of_match_device(mt7621_spi_match, &pdev->dev); if (!match) @@ -377,7 +378,11 @@ static int mt7621_spi_probe(struct platform_device *pdev) rs->pending_write = 0; dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq); - device_reset(&pdev->dev); + ret = device_reset(&pdev->dev); + if (ret) { + dev_err(&pdev->dev, "SPI reset failed!\n"); + return ret; + } mt7621_spi_reset(rs); -- 2.19.1