Re: [PATCH v3 2/4] bus: fsl-mc: add fsl-mc userspace support

From: gregkh@xxxxxxxxxxxxxxxxxxx
Date: Tue Nov 20 2018 - 11:58:13 EST


On Tue, Nov 20, 2018 at 04:51:07PM +0000, Ioana Ciornei wrote:
> > On Tue, Nov 20, 2018 at 03:39:45PM +0000, Ioana Ciornei wrote:
> > > +
> > > + error = fsl_mc_uapi_create_device_file(mc_bus);
> > > + if (error < 0) {
> > > + error = -EPROBE_DEFER;
> > > + goto error_cleanup_msi_domain;
> > > + }
> >
> > What error could occur here that would be somehow fixed if you defer and try
> > this all again? Shouldn't you just return the error given (as something really went
> > wrong here, it's not a "something else needs to start up first issue), and abort?
> >
>
> It's really a "something else needs to start up first" type of issue. The fsl_mc_uapi_create_device_file fails only if the misc_register fails and this could really happen when the misc char driver is not yet initialized.
>
> Initially, I have used the register_chrdev API and you suggested to use a misc device and just defer probe if it's not yet initialized.

Ok, fair enough, looks good to me, thanks for answering.

greg k-h