Commit 5b711870 authored by Kangjie Lu's avatar Kangjie Lu Committed by Mauro Carvalho Chehab

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: default avatarKangjie Lu <kjlu@umn.edu>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 5ceaf545
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment