Wen Yang <wenyang@xxxxxxxxxxxxxxxxx> writes: > device_add() has increased the reference count, > > so when it returns an error, an additional call to put_device() > > is needed here to reduce the reference count. No, in case of error it also drops its reference. Regards, -- Alex