linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v3 1/1] i2c: imx: refactor error handling on i2c_imx_dma_request()
Date: Fri, 21 Dec 2018 16:24:41 +0100	[thread overview]
Message-ID: <20181221152441.2nq5hjpoujioyf7n@pengutronix.de> (raw)
In-Reply-To: <20181130094418.17700-1-o.rempel@pengutronix.de>

Hello,

On Fri, Nov 30, 2018 at 10:44:18AM +0100, Oleksij Rempel wrote:
> @@ -1159,11 +1163,13 @@ static int i2c_imx_probe(struct platform_device *pdev)
>  	dev_dbg(&i2c_imx->adapter.dev, "device resources: %pR\n", res);
>  	dev_dbg(&i2c_imx->adapter.dev, "adapter name: \"%s\"\n",
>  		i2c_imx->adapter.name);
> -	dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n");
>  
>  	/* Init DMA config if supported */
> -	i2c_imx_dma_request(i2c_imx, phy_addr);
> +	ret = i2c_imx_dma_request(i2c_imx, phy_addr);
> +	if (ret < 0)
> +		goto clk_notifier_unregister;

Just found another problem while going over my mails:

goto clk_notifier_unregister is wrong here as you have to undo
i2c_add_numbered_adapter(). Probably it also makes sense to move
initialisation of DMA before i2c_add_numbered_adapter() because
otherwise the first transfer request might come in while
i2c_imx_dma_request is in the middle of initializing the dma channels.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

      parent reply	other threads:[~2018-12-21 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30  9:44 [PATCH v3 1/1] i2c: imx: refactor error handling on i2c_imx_dma_request() Oleksij Rempel
2018-11-30  9:52 ` Uwe Kleine-König
2018-12-21 15:24 ` Uwe Kleine-König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181221152441.2nq5hjpoujioyf7n@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=o.rempel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).