Is erectile dysfunction linked to prostate cancer?

I have mild erectile dysfunction. Is it due to prostate cancer?