diff options
author | Kangjie Lu <kjlu@umn.edu> | 2018-12-25 03:24:41 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-01-16 11:25:27 -0500 |
commit | 5b711870bec4dc9a6d705d41e127e73944fa3650 (patch) | |
tree | 713ff3265cbb46e1c99946fa882f053cd05fa2d8 /drivers/media | |
parent | 5ceaf5452c1b2a452dadaf377f9f07af7bda9cc3 (diff) | |
download | talos-op-linux-5b711870bec4dc9a6d705d41e127e73944fa3650.tar.gz talos-op-linux-5b711870bec4dc9a6d705d41e127e73944fa3650.zip |
media: usb: gspca: add a missed check for goto_low_power
The fix checks if goto_low_power() fails, and if so, issues an error
message.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/gspca/cpia1.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c index 23fbda56fc91..7c817a4a93c4 100644 --- a/drivers/media/usb/gspca/cpia1.c +++ b/drivers/media/usb/gspca/cpia1.c @@ -1434,6 +1434,7 @@ static int sd_config(struct gspca_dev *gspca_dev, { struct sd *sd = (struct sd *) gspca_dev; struct cam *cam; + int ret; sd->mainsFreq = FREQ_DEF == V4L2_CID_POWER_LINE_FREQUENCY_60HZ; reset_camera_params(gspca_dev); @@ -1445,7 +1446,10 @@ static int sd_config(struct gspca_dev *gspca_dev, cam->cam_mode = mode; cam->nmodes = ARRAY_SIZE(mode); - goto_low_power(gspca_dev); + ret = goto_low_power(gspca_dev); + if (ret) + gspca_err(gspca_dev, "Cannot go to low power mode: %d\n", + ret); /* Check the firmware version. */ sd->params.version.firmwareVersion = 0; get_version_information(gspca_dev); |