Asimov, an American science fiction writer in the sixties posited the three laws of Robotics:
1 - A robot may not injure a human being or, through inaction, allow a human being to come to harm.
2 - A robot must obey the orders given to it by human beings, except where such orders would conflict with the First Law.
3 - A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
as a way of determining the ethics of Robot-Human interaction. He ends with a zeroth law of Robotics:
0 - A robot may not harm humanity, or, by inaction, allow humanity to come to harm.
Iain Banks, another writer of science fiction, in his Culture novels posits a universe where vast spaceships are under the beneficent control of artificial minds many magnitudes greater than that of humans; they are entirely enigmatic.
So, certainly the SF corpus does not consistently draw artificial intelligence as uniformly dystopian.
Of course none of the above is strictly philosophical in the academic sense, but this isn't an issue that can be fruitfully discussed in a sensible way (yet);for the forseeable future, as user4894 posits, humanitys greatest danger to itself is probably itself - and it is the recognition of this that determines one perspective on ethics, and in fact the only one in the secular world-view (in other traditions, such as the Abrahamic religions it is sanctioned by God)
Hawking & Musk are right to be concerned, but their concern must be interpreted given that AI in the proper sense - self-awareness and consciousness - isn't possible in the forseeable future, does not mean that technologies that fit within this narrative may not be ethically dangerous in the near future. This is already being seen in drone warfare and mass surveillance.