platform/x86/intel/vsec: Assign auxdev parent by argument
authorDavid E. Box <david.e.box@linux.intel.com>
Wed, 29 Nov 2023 22:21:18 +0000 (14:21 -0800)
committerHans de Goede <hdegoede@redhat.com>
Mon, 4 Dec 2023 13:53:29 +0000 (14:53 +0100)
commit6dfc2514acee37e30ce59f1f25b1f8f6aa7c1b08
tree482bb49495dbcd3f6770097f96035d5ae80bd5a3
parent1d1b4770d4b661ecdf899c314ce406b9840c0c22
platform/x86/intel/vsec: Assign auxdev parent by argument

Instead of checking for a NULL parent argument in intel_vsec_add_aux() and
then assigning it to the probed device, remove this check and just pass the
device in the call. Since this function is exported, return -EINVAL if the
parent is not specified.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129222132.2331261-7-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/vsec.c