Skip to contentSkip to conversation

linux-next: manual merge of the akpm tree with the char-misc tree

DISCUSSION Stephen Rothwell 1 participant 1 message Jun 23, 2014 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in drivers/w1/w1_int.c between commit fdc9167a7853 ("w1: use pr_* instead of printk") from the char-misc tree and commit "drivers/w1/w1_int.c:
call put_device if device_register fails" from the akpm tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 21 lines
Cheers,
Stephen Rothwell                    [email protected]

diff --cc drivers/w1/w1_int.c
index 47249a30eae3,ec3fc9335f0d..000000000000
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@@ -90,10 -91,9 +90,9 @@@ static struct w1_master *w1_alloc_dev(u
  
  	err = device_register(&dev->dev);
  	if (err) {
 -		printk(KERN_ERR "Failed to register master device. err=%d\n", err);
 +		pr_err("Failed to register master device. err=%d\n", err);
- 		memset(dev, 0, sizeof(struct w1_master));
- 		kfree(dev);
- 		dev = NULL;
+ 		put_device(&dev->dev);
+ 		return NULL;
  	}
  
  	return dev;