Message ID | 20231231103057.35837-15-hdegoede@redhat.com |
---|---|
State | Accepted |
Commit | ace440e6db33330b40afbb7c2c85a6b1399f3baa |
Headers | show |
Series | media: atomisp: NULL pointer deref + missing firmware fixes | expand |
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 7e241f4e9e93..f736e54c7df3 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -587,9 +587,6 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable) usleep_range(100, 150); } while (1); - if (enable) - msleep(10); - dev_err(isp->dev, "IUNIT power-%s timeout.\n", enable ? "on" : "off"); return -EBUSY; }
Remove unnecessary msleep(10) from atomisp_mrfld_power() error-exit path, the success exit from atomisp_mrfld_power() happens if a test succeeds inside the do { } while loop above the msleep(). The error-exit path with the removed msleep is only hit it the power-on is not reflected in the iUNIT ISPSSPM0 status bits after a timeout of 50 ms. Sleeping an extra 10 ms in the timeout path makes little sense. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 3 --- 1 file changed, 3 deletions(-)