On Fri, Aug 11, 2023 at 05:27:56PM +0800, Yang Yingliang wrote: > The driver data will be cleared in device_unbind_cleanup() in driver > core code. So the dev_set_drvdata(..., NULL) called in remove and error > path in probe can be removed. > > Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx> > --- > drivers/staging/axis-fifo/axis-fifo.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c > index 727b956aa231..b9dc3c01a5f3 100644 > --- a/drivers/staging/axis-fifo/axis-fifo.c > +++ b/drivers/staging/axis-fifo/axis-fifo.c > @@ -899,7 +899,6 @@ static int axis_fifo_probe(struct platform_device *pdev) > return 0; > > err_initial: > - dev_set_drvdata(dev, NULL); > return rc; I can't really get excited about these patches. Setting dev_set_drvdata() to NULL is harmless... But if we were going to do it, then I'd prefer to get rid of the err_initial: label as well. regards, dan carpenter