The value of priv->irq will contain an error code. You should return it.