lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b2b86520908220420p282c862fn9c44697db010a08d@mail.gmail.com>
Date:	Sat, 22 Aug 2009 12:20:27 +0100
From:	Alan Jenkins <sourcejedi.lkml@...glemail.com>
To:	Mario Limonciello <Mario_Limonciello@...l.com>
Cc:	cezary.jackiewicz@...il.com, linux-wireless@...r.kernel.org,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] compal-laptop: Replace sysfs support with rfkill support

On 8/21/09, Mario Limonciello <Mario_Limonciello@...l.com> wrote:
> This drops the support for manually groking the files in sysfs
> to turn on and off the WLAN and BT for Compal laptops in favor
> of platform rfkill support.
>
> It has been combined into a single patch to not introduce regressions
> in the process of simply adding rfkill support.
>
> Signed-off-by: Mario Limonciello <Mario_Limonciello@...l.com>

> @@ -390,23 +314,19 @@ static int __init compal_init(void)
>
>  	ret = platform_device_add(compal_device);
>  	if (ret)
> -		goto fail_platform_device1;
> +		goto fail_platform_device;
>
> -	ret = sysfs_create_group(&compal_device->dev.kobj,
> -		&compal_attribute_group);
> +	ret = setup_rfkill();
>  	if (ret)
> -		goto fail_platform_device2;
> +		goto fail_rfkill;
>
>  	printk(KERN_INFO "compal-laptop: driver "COMPAL_DRIVER_VERSION
>  		" successfully loaded.\n");
>
>  	return 0;
>
> -fail_platform_device2:
> -
> -	platform_device_del(compal_device);
> -
> -fail_platform_device1:
> +fail_rfkill:
> +fail_platform_device:
>
>  	platform_device_put(compal_device);
>

I guess our mails crossed.  As in the previous patch I think
platform_device_del() should still be called, in the fail_rfkill case.

Previously platform_device_del() was required after
platform_device_add(), if we bailed out because of a failure in
sysfs_create_group().  I don't think that requirement is removed by
replacing sysfs_create_group() with setup_rfkill().

Regards
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ