Re: [PATCH v3 3/3] platform/x86: hsmp: Check ACPI_COMPANION() against NULL
Carlos Bilbao <[email protected]>
| Newsgroups | org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 7/13/26 08:14, Jiale Yao wrote: > Add a requisite ACPI_COMPANION() check against NULL to the > AMD HSMP acpi probe, aligning with the fix applied to > asus-wireless driver. The commit message makes no sense. > > Assisted-by: claude:deepseek-v4-pro > Signed-off-by: Jiale Yao <[email protected]> > --- > drivers/platform/x86/amd/hsmp/acpi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c > index 97ed71593bdf..615b3ebe66e7 100644 > --- a/drivers/platform/x86/amd/hsmp/acpi.c > +++ b/drivers/platform/x86/amd/hsmp/acpi.c > @@ -71,6 +71,8 @@ static inline int hsmp_get_uid(struct device *dev, u16 *sock_ind) > { > char *uid; > > + if (!ACPI_COMPANION(dev)) > + return -ENODEV; Check uid != NULL after the assignment below too, then? > /* > * UID (ID00, ID01..IDXX) is used for differentiating sockets, > * read it and strip the "ID" part of it and convert the remaining Thanks, Carlos