[PATCH] I2C fixes for 2.6.10-rc2

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

 



ChangeSet 1.2223.2.12, 2004/11/30 15:23:40-08:00, johnpol at 2ka.mipt.ru

[PATCH] W1: check nls in return path.

Check netlink socket being non NULL in error return path.

Signed-off-by: Evgeniy Polyakov <johnpol at 2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>


 drivers/w1/w1_int.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
--- a/drivers/w1/w1_int.c	2004-11-30 16:00:26 -08:00
+++ b/drivers/w1/w1_int.c	2004-11-30 16:00:26 -08:00
@@ -96,7 +96,7 @@
 	err = device_register(&dev->dev);
 	if (err) {
 		printk(KERN_ERR "Failed to register master device. err=%d\n", err);
-		if (dev->nls->sk_socket)
+		if (dev->nls && dev->nls->sk_socket)
 			sock_release(dev->nls->sk_socket);
 		memset(dev, 0, sizeof(struct w1_master));
 		kfree(dev);




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux