I'm starting to grow quite weary of these "unnecessary check" changes.
Sometimes it is better to have them, either because the path is a hot
path or some atomic sequence is involved.
But there is never harm in them being there.
All of this is a matter of taste, of course. But one thing I know
From: Markus Elfring
Date: Sat, 14 Nov 2015 17:58:00 +0100
The put_device() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.