Re: [GIT PULL 1/3] intel_th: Fix a double put_device() in error path

From: Alexander Shishkin
Date: Wed Nov 20 2019 - 08:44:40 EST

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.