Message ID | 1494936445-27331-2-git-send-email-thomas.petazzoni@free-electrons.com |
---|---|
State | Accepted |
Headers | show |
On Tue, May 16, 2017 at 02:07:25PM +0200, Thomas Petazzoni wrote: > platform_get_irq() returns an error code, so instead of inventing our > own error code (-ENXIO), return the one provided by > platform_get_irq(). Most notably, this allows an -EPROBE_DEFER > returned by platform_get_irq() to be propagate as the return value of > ->probe(), which allows deferred probing of the interrupt controller. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Thanks! I squashed the two commits into one because then I can count it as a bugfix and apply it to for-current. I hope you are fine with this.
Hello, On Tue, 16 May 2017 23:28:12 +0200, Wolfram Sang wrote: > On Tue, May 16, 2017 at 02:07:25PM +0200, Thomas Petazzoni wrote: > > platform_get_irq() returns an error code, so instead of inventing our > > own error code (-ENXIO), return the one provided by > > platform_get_irq(). Most notably, this allows an -EPROBE_DEFER > > returned by platform_get_irq() to be propagate as the return value of > > ->probe(), which allows deferred probing of the interrupt controller. > > > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > Thanks! I squashed the two commits into one because then I can count it > as a bugfix and apply it to for-current. I hope you are fine with this. Sounds good to me. Thanks! Thomas
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index f0a4d15..f0ddf7d 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -918,7 +918,7 @@ mv64xxx_i2c_probe(struct platform_device *pd) goto exit_clk; } if (drv_data->irq < 0) { - rc = -ENXIO; + rc = drv_data->irq; goto exit_reset; }
platform_get_irq() returns an error code, so instead of inventing our own error code (-ENXIO), return the one provided by platform_get_irq(). Most notably, this allows an -EPROBE_DEFER returned by platform_get_irq() to be propagate as the return value of ->probe(), which allows deferred probing of the interrupt controller. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)