Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1022651yba; Thu, 4 Apr 2019 02:38:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyJE0ztBIBahfyC0qGHLoQoUat2Xk7mQI6qQdB6okroRoXMf9VD0KxPA25SS1uZrIiMLJO X-Received: by 2002:a17:902:547:: with SMTP id 65mr5369453plf.242.1554370706320; Thu, 04 Apr 2019 02:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370706; cv=none; d=google.com; s=arc-20160816; b=lI6Y+GiDhdTRupBOTThgST/SEGZf0BSqksyAIp7IAUk+yB4YrxNTyBJnWATz+anMM1 U3iS3WQO+z6y6ILzstqU1ltFV2brv2x+qbCzXHjzcO0dlg8t/USiSE/fxZMbYpTmCRyz u/nUy4YT6LvFc04UAizlGTC8V90kImg7rQVA1i28P/ibFKdviPomYrU+SKxDWxn1zinJ OFbEnq4dCpFHktBEBOeoYQhtssSSFKzxMIu4bpyN0u2jNoOzpxFvU9EWwaVicbe5qeYn cxZ3vp+huQyJPdYcPPhM+fe0LMCRxiu8rMdeMIGkaYdQHtrUuHkXtsgxM0/vTh2hn1Ar HQ9A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=32CChJ3PMIACaaiP9xBMh+HUzthahcGOhDEyoqJ2Bb4=; b=RIbXVR6JWNqC1fNOW1yjTbthPRwDxLFCGsHZKu55PRr2/XOPuineZWCcXgMg6by8Yx 2VwxOeHi6iN94htWcVY2UuM3e+bE564KJzpuVDK3OwakjLXfNIahYfMo9n+tz3LzsbwU zQHyfytzT7h+8GU1PPPUFZRnWSZuGd94yXwZoaB5jZsrwkhHqjxK0yb2t8uL+Cc/OA6p z9udJS/ABk3rV4A4S5IF8yeHVWwL/mAdE4/J7Udl3owE5s1wpBHba2FpzvvJ3U2pRtCu lvxheOuX+2/vwm8yhOn+ZzkJuySvSUFWAH3IMSVrjBxWLvEZSHkAk0r7p0hyiNUdUHG6 PPVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K6KUcS6u; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g31si31789plg.154.2019.04.04.02.38.10; Thu, 04 Apr 2019 02:38:26 -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=K6KUcS6u; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732140AbfDDJFY (ORCPT + 99 others); Thu, 4 Apr 2019 05:05:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:43416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732129AbfDDJFX (ORCPT ); Thu, 4 Apr 2019 05:05:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BBE482184B; Thu, 4 Apr 2019 09:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368722; bh=jHabDNYXQuI6jAvSLpbfQ8BMZOrW0ZTQu6W6fn90SNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K6KUcS6ufQOV4bwc28qJAQTinnyEaIudTH/3kyk0PXuglGLRYhqyKPVDpf8kE+bpY 8rag2toUlNLYX5zC0VvMVrhW4H6LccN7eYe5xy+nsvdUk8E58z3CaSCwh8A570oB5f ZoWq3Sf0gP9Dzr7uUALaJlLsk8WzNfQFHwbJEmPo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Roese , Mark Brown , Sankalp Negi , Chuanhong Guo , John Crispin , NeilBrown , Sasha Levin Subject: [PATCH 4.19 129/187] staging: spi: mt7621: Add return code check on device_reset() Date: Thu, 4 Apr 2019 10:47:46 +0200 Message-Id: <20190404084609.291595426@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 d045b5568e0f..578aa6824ad3 100644 --- a/drivers/staging/mt7621-spi/spi-mt7621.c +++ b/drivers/staging/mt7621-spi/spi-mt7621.c @@ -429,6 +429,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) @@ -476,7 +477,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, 0); -- 2.19.1