[PATCH 10/11 v2] staging: dgap: Fix printk related errors as reported by checkpatch
Dan Carpenter
dan.carpenter at oracle.com
Mon Mar 3 15:30:56 UTC 2014
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
More information about the devel
mailing list