From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754148AbdDKIjE (ORCPT ); Tue, 11 Apr 2017 04:39:04 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:55194 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752278AbdDKIjB (ORCPT ); Tue, 11 Apr 2017 04:39:01 -0400 Subject: Re: [PATCH] gpu: host1x: Fix error handling To: Christophe JAILLET , thierry.reding@gmail.com References: <20170410202922.17665-1-christophe.jaillet@wanadoo.fr> Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org From: Mikko Perttunen Message-ID: <2df1f833-15f2-07fc-7949-a8bde1b8e7ab@kapsi.fi> Date: Tue, 11 Apr 2017 11:38:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20170410202922.17665-1-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 62.209.167.43 X-SA-Exim-Mail-From: cyndis@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10.04.2017 23:29, Christophe JAILLET wrote: > If 'devm_reset_control_get' returns an error, then we erroneously return > success because error code is taken from 'host->clk' instead of > 'host->rst'. > > Fixes: b386c6b73ac6 ("gpu: host1x: Support module reset") > > Signed-off-by: Christophe JAILLET > --- > drivers/gpu/host1x/dev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > index f05ebb14fa63..ac65f52850a6 100644 > --- a/drivers/gpu/host1x/dev.c > +++ b/drivers/gpu/host1x/dev.c > @@ -172,7 +172,7 @@ static int host1x_probe(struct platform_device *pdev) > > host->rst = devm_reset_control_get(&pdev->dev, "host1x"); > if (IS_ERR(host->rst)) { > - err = PTR_ERR(host->clk); > + err = PTR_ERR(host->rst); > dev_err(&pdev->dev, "failed to get reset: %d\n", err); > return err; > } > Reviewed-by: Mikko Perttunen