Fix bug introduced by r351184.

We should check the returned handle, not the pointer to it.

Noticed by:	ian
X-MFC with:	r351184
MFC after:	1 week
This commit is contained in:
Michal Meloun 2019-08-18 15:37:19 +00:00
parent 33205c60e7
commit 76eeda8557
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351189

View File

@ -134,7 +134,7 @@ simple_mfd_syscon_get_handle(device_t dev, struct syscon **syscon)
sc = device_get_softc(dev);
*syscon = sc->syscon;
if (syscon == NULL)
if (*syscon == NULL)
return (ENODEV);
return (0);
}