Skip to contentSkip to conversation

platform/x86: intel_cht_int33fe: Set driver data

PATCH In review Heikki Krogerus 2 participants 2 messages May 19, 2022 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: intel_cht_int33fe: Set driver data

Module removal fails because cht_int33fe_typec_remove() tries to access driver data that does not exist. Fixing by assigning the data at the end of probe.

Fixes 915623a80b5a ("platform/x86: intel_cht_int33fe: Switch to DMI modalias based loading")
---
 drivers/platform/x86/intel/chtwc_int33fe.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/platform/x86/intel/chtwc_int33fe.c +2 -0
index 0de509fbf0209..c52ac23e23315 100644
@@ -389,6 +389,8 @@ static int cht_int33fe_typec_probe(struct platform_device *pdev)
 		goto out_unregister_fusb302;
 	}
 
+	platform_set_drvdata(pdev, data);
+
 	return 0;
 
 out_unregister_fusb302:
Signature · 1 line
2.35.1
#1 lore raw

Hi,

Quoted 6 lines · Heikki Krogerus

Module removal fails because cht_int33fe_typec_remove() tries to access driver data that does not exist. Fixing by assigning the data at the end of probe.

Fixes 915623a80b5a ("platform/x86: intel_cht_int33fe: Switch to DMI modalias based loading")

Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.

Regards,

Hans

Quoted 17 lines
---
 drivers/platform/x86/intel/chtwc_int33fe.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/platform/x86/intel/chtwc_int33fe.c +2 -0
index 0de509fbf0209..c52ac23e23315 100644
@@ -389,6 +389,8 @@ static int cht_int33fe_typec_probe(struct platform_device *pdev)
 		goto out_unregister_fusb302;
 	}
 
+	platform_set_drvdata(pdev, data);
+
 	return 0;
 
 out_unregister_fusb302: