Previously this driver used pm_runtime_sync_get() and did not handle any
errors that occurred.  Moving to the new pm_runtime_resume_and_get() +
handle errors.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Andreas Klinger <ak@it-klinger.de>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210509113354.660190-26-jic23@kernel.org
 
        u64 dt_ns;
        u32 time_ns, distance_mm;
 
-       if (data->gpiod_power)
-               pm_runtime_get_sync(data->dev);
-
+       if (data->gpiod_power) {
+               ret = pm_runtime_resume_and_get(data->dev);
+               if (ret < 0)
+                       return ret;
+       }
        /*
         * just one read-echo-cycle can take place at a time
         * ==> lock against concurrent reading calls