Lines Matching refs:rv
197 int rv; in setup_ring() local
206 rv = xenbus_grant_ring(dev, &priv->shr, 1, &gref); in setup_ring()
207 if (rv < 0) in setup_ring()
208 return rv; in setup_ring()
212 rv = xenbus_alloc_evtchn(dev, &priv->evtchn); in setup_ring()
213 if (rv) in setup_ring()
214 return rv; in setup_ring()
216 rv = bind_evtchn_to_irqhandler(priv->evtchn, tpmif_interrupt, 0, in setup_ring()
218 if (rv <= 0) { in setup_ring()
219 xenbus_dev_fatal(dev, rv, "allocating TPM irq"); in setup_ring()
220 return rv; in setup_ring()
222 priv->irq = rv; in setup_ring()
225 rv = xenbus_transaction_start(&xbt); in setup_ring()
226 if (rv) { in setup_ring()
227 xenbus_dev_fatal(dev, rv, "starting transaction"); in setup_ring()
228 return rv; in setup_ring()
231 rv = xenbus_printf(xbt, dev->nodename, in setup_ring()
233 if (rv) { in setup_ring()
238 rv = xenbus_printf(xbt, dev->nodename, "event-channel", "%u", in setup_ring()
240 if (rv) { in setup_ring()
245 rv = xenbus_printf(xbt, dev->nodename, "feature-protocol-v2", "1"); in setup_ring()
246 if (rv) { in setup_ring()
251 rv = xenbus_transaction_end(xbt, 0); in setup_ring()
252 if (rv == -EAGAIN) in setup_ring()
254 if (rv) { in setup_ring()
255 xenbus_dev_fatal(dev, rv, "completing transaction"); in setup_ring()
256 return rv; in setup_ring()
266 xenbus_dev_error(dev, rv, "%s", message); in setup_ring()
268 return rv; in setup_ring()
293 int rv; in tpmfront_probe() local
301 rv = setup_chip(&dev->dev, priv); in tpmfront_probe()
302 if (rv) { in tpmfront_probe()
304 return rv; in tpmfront_probe()
307 rv = setup_ring(dev, priv); in tpmfront_probe()
308 if (rv) { in tpmfront_probe()
311 return rv; in tpmfront_probe()