Messages in this thread | | | Date | Mon, 15 Oct 2018 20:36:05 +0200 | From | Greg KH <> | Subject | Re: [PATCH v3 07/15] platform: goldfish: pipe: Return status from "deinit" since "remove" does not do much |
| |
On Wed, Oct 03, 2018 at 10:17:12AM -0700, rkir@google.com wrote: > From: Roman Kiryanov <rkir@google.com> > > This way deinit will have a chance to report an error. > > Signed-off-by: Roman Kiryanov <rkir@google.com> > --- > Changes in v3: > - No change. > Changes in v2: > - No change. > > drivers/platform/goldfish/goldfish_pipe.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c > index 445c0c0c66c4..1822d4146778 100644 > --- a/drivers/platform/goldfish/goldfish_pipe.c > +++ b/drivers/platform/goldfish/goldfish_pipe.c > @@ -888,13 +888,15 @@ static int goldfish_pipe_device_init(struct platform_device *pdev, > return 0; > } > > -static void goldfish_pipe_device_deinit(struct platform_device *pdev, > - struct goldfish_pipe_dev *dev) > +static int goldfish_pipe_device_deinit(struct platform_device *pdev, > + struct goldfish_pipe_dev *dev) > { > misc_deregister(&dev->miscdev); > tasklet_kill(&dev->irq_tasklet); > kfree(dev->pipes); > free_page((unsigned long)dev->buffers); > + > + return 0; > }
This function can not fail, why are you returning 0 always? That doesn't make sense.
thanks,
greg k-h
| |