Re: [PATCH RESEND] spi: erase pointer to drvdata on removal

From: Vivien Didelot
Date: Tue Dec 04 2012 - 11:39:35 EST


Hi Grant,

On Tue, 2012-12-04 at 14:56 +0000, Grant Likely wrote:
> Instead of clearing the pointer only in the spi code, perhaps the
> checks should be in really_probe() and __device_release_driver() so it
> covers all bus types. Also, don't clear the pointer. Just use
> dev_err() to report on the driver bug so that it gets fixed properly.

I agree with you. I just figured out that on 2012-05-23, Hans de Goede
added a patch (0998d063) to enforce drvdata to be NULL after
device_release or on probe failure. Good to know.

Thanks,
Vivien

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/