lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 17 Mar 2012 17:20:16 +0100 From: Oliver Neukum <oliver@...kum.org> To: santosh prasad nayak <santoshprasadnayak@...il.com> Cc: mchehab@...radead.org, gregkh@...uxfoundation.org, khoroshilov@...ras.ru, linux-media@...r.kernel.org, devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org Subject: Re: [PATCH] [media] staging: Return -EINTR in s2250_probe() if fails to get lock. Am Samstag, 17. März 2012, 17:00:36 schrieb santosh prasad nayak: > Oliver, > > The following changes are for review only not a formal patch. > > ------------------------------------------------------------------------------------------------------------- > - if (mutex_lock_interruptible(&usb->i2c_lock) == 0) { > + mutex_lock(&usb->i2c_lock); > data = kzalloc(16, GFP_KERNEL); > - if (data != NULL) { > + if(data == NULL) { > + i2c_unregister_device(audio); > + kfree(state); > + return -ENOMEM; > + } else { > int rc; > rc = go7007_usb_vendor_request(go, 0x41, 0, 0, > data, 16, 1); > @@ -657,7 +661,7 @@ static int s2250_probe(struct i2c_client *client, > kfree(data); > } > mutex_unlock(&usb->i2c_lock); > - } > + > > ---------------------------------------------------------------------- > > > Is it ok ? Hi, well done. That's correct. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists