Non c'è alcun errore nello spezzone di codice che hai postato, posta il contesto e l'errore completo.