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 situations Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html