[PATCH 10/11 v2] staging: dgap: Fix printk related errors as reported by checkpatch
Mark Hounschell
markh at compro.net
Mon Mar 3 15:42:18 UTC 2014
On 03/03/2014 10:30 AM, Dan Carpenter wrote:
> On Mon, Mar 03, 2014 at 10:11:07AM -0500, Mark Hounschell wrote:
>> @@ -6689,7 +6681,6 @@ static void dgap_create_tty_sysfs(struct un_t *un, struct device *c)
>>
>> ret = sysfs_create_group(&c->kobj, &dgap_tty_attribute_group);
>> if (ret) {
>> - printk(KERN_ERR "dgap: failed to create sysfs tty device attributes.\n");
>> sysfs_remove_group(&c->kobj, &dgap_tty_attribute_group);
>> return;
>> }
>
>
> This looks buggy. We should just return instead of removing the group
> which we failed to create. Please, fix this in a later patch. Should
> be:
>
> ret = sysfs_create_group(&c->kobj, &dgap_tty_attribute_group);
> if (ret)
> return;
>
> regards,
> dan carpenter
OK.
Mark
More information about the devel
mailing list