Lines Matching refs:rv
255 int rv; in setup_ring() local
257 rv = xenbus_setup_ring(dev, GFP_KERNEL, (void **)&priv->shr, 1, in setup_ring()
259 if (rv < 0) in setup_ring()
260 return rv; in setup_ring()
262 rv = xenbus_alloc_evtchn(dev, &priv->evtchn); in setup_ring()
263 if (rv) in setup_ring()
264 return rv; in setup_ring()
266 rv = bind_evtchn_to_irqhandler(priv->evtchn, tpmif_interrupt, 0, in setup_ring()
268 if (rv <= 0) { in setup_ring()
269 xenbus_dev_fatal(dev, rv, "allocating TPM irq"); in setup_ring()
270 return rv; in setup_ring()
272 priv->irq = rv; in setup_ring()
275 rv = xenbus_transaction_start(&xbt); in setup_ring()
276 if (rv) { in setup_ring()
277 xenbus_dev_fatal(dev, rv, "starting transaction"); in setup_ring()
278 return rv; in setup_ring()
281 rv = xenbus_printf(xbt, dev->nodename, in setup_ring()
283 if (rv) { in setup_ring()
288 rv = xenbus_printf(xbt, dev->nodename, "event-channel", "%u", in setup_ring()
290 if (rv) { in setup_ring()
295 rv = xenbus_printf(xbt, dev->nodename, "feature-protocol-v2", "1"); in setup_ring()
296 if (rv) { in setup_ring()
301 rv = xenbus_transaction_end(xbt, 0); in setup_ring()
302 if (rv == -EAGAIN) in setup_ring()
304 if (rv) { in setup_ring()
305 xenbus_dev_fatal(dev, rv, "completing transaction"); in setup_ring()
306 return rv; in setup_ring()
316 xenbus_dev_error(dev, rv, "%s", message); in setup_ring()
318 return rv; in setup_ring()
338 int rv; in tpmfront_probe() local
346 rv = setup_chip(&dev->dev, priv); in tpmfront_probe()
347 if (rv) { in tpmfront_probe()
349 return rv; in tpmfront_probe()
352 rv = setup_ring(dev, priv); in tpmfront_probe()
353 if (rv) { in tpmfront_probe()
355 return rv; in tpmfront_probe()