Re: [PATCH] i2c: tegra: Add i2c support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 16, 2011 at 09:37:23AM -0800, Stephen Warren wrote:
> On 08/02/11 12:44, Mark Brown wrote:
> > ...
> > +		goto err_iounmap;
> > +	}
> > +	irq = res->start;
> > +
> > +	clk = clk_get(&pdev->dev, NULL);
> > +	if (!clk) {
> 
> This should be:
> 
> if (!IS_ERR(clk)) {
> 
> > +		ret = -ENOMEM;
> 
> This should probably be:
> 
> ret = PTR_ERR(clk);
> 
> although Ben made some comments in his review re: certain error codes being
> ignored by the higher layers; I'm not sure if that applies here or not.

at this point, we should probably print an error at-least. IIRC, it is
-ENODEV and possibly -EIO that get ignored, everything else should be
dealt with as an device-exists-but-is-not-working.
 
> > +		goto err_release_region;
> > +	}
> > +

thanks for spotting this one.

-- 
Ben Dooks, ben@xxxxxxxxx, http://www.fluff.org/ben/

Large Hadron Colada: A large Pina Colada that makes the universe disappear.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux