Bristol City pick up a first win in six matches as they beat Charlton Athletic in Roy Hodgson's first game in charge.