Skip to contentSkip to conversation

Add WMI driver for controlling AlienFX features on some Alienware products

DISCUSSION Dan Carpenter 2 participants 2 messages Apr 9, 2014 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

Hello Mario Limonciello,

This is a semi-automatic email about new static checker warnings.

The patch d17a5ee12973: "Add WMI driver for controlling AlienFX features on some Alienware products" from Apr 4, 2014, leads to the following Smatch complaint:

drivers/platform/x86/alienware-wmi.c:551 alienware_wmi_exit()
warn: variable dereferenced before check 'platform_device' (see line 549)

drivers/platform/x86/alienware-wmi.c
548 {

   549		alienware_zone_exit(platform_device);
                                    ^^^^^^^^^^^^^^^
   550		remove_hdmi(platform_device);
                            ^^^^^^^^^^^^^^^
   551		if (platform_device) {
                    ^^^^^^^^^^^^^^^

552 platform_device_unregister(platform_device);
553 platform_driver_unregister(&platform_driver);

regards,
dan carpenter

#1 lore raw
Quoted 22 lines · Dan Carpenter

Hello Mario Limonciello,

This is a semi-automatic email about new static checker warnings.

The patch d17a5ee12973: "Add WMI driver for controlling AlienFX features on some Alienware products" from Apr 4, 2014, leads to the following Smatch complaint:

drivers/platform/x86/alienware-wmi.c:551 alienware_wmi_exit()
warn: variable dereferenced before check 'platform_device' (see line 549)

drivers/platform/x86/alienware-wmi.c

    548	{
    549		alienware_zone_exit(platform_device);
                                     ^^^^^^^^^^^^^^^
    550		remove_hdmi(platform_device);
                             ^^^^^^^^^^^^^^^
    551		if (platform_device) {
                     ^^^^^^^^^^^^^^^
    552			platform_device_unregister(platform_device);
    553			platform_driver_unregister(&platform_driver);
Quoted 2 lines

regards,
dan carpenter

Hi Dan,

Thanks for letting me know. I did submit a follow up patch for this behavior here a few days ago:

http://www.spinics.net/lists/platform-driver-x86/msg05233.html

Thanks,