Re: [PATCH 10/11 v2] staging: dgap: Fix printk related errors as reported by checkpatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux