On Thu, Nov 22, 2012 at 10:20:02AM +0100, Sebastian Andrzej Siewior wrote:
> On Thu, Nov 22, 2012 at 07:56:44AM +0200, Felipe Balbi wrote:
> > > > /* dma address for sync dma */
> > > > mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> > > > if (!mem) {
> > > > pr_debug("no sync dma resource?\n");
> > > > ret = -ENODEV;
> > >
> > > Also I am not sure if it is a proper error code for this case, maybe
> > > EINVAL
> > > is better.
> >
> > -ENOMEM sounds more correct to me.
>
> No, please don't try to match the current error to the best matching errno
> code available. ENOMEM is when you run out of memory. Here you don't have a
> memory address which means your input parameter is wrong (aka EINVAL). You
> could argue about ENXIO but EINVAL fits well in this kind of situationsfair enough, you convinced me -- balbi
signature.asc
Description: Digital signature
