mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
media: ccs: Fail the probe on CCS static data parser failure
No need to continue probing when the CCS static data parser fails. Improve this by checking the return value and correctly exiting on failure. Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
a29053906c
commit
f8d0343046
|
|
@ -3335,9 +3335,11 @@ static int ccs_probe(struct i2c_client *client)
|
|||
|
||||
rval = request_firmware(&fw, filename, &client->dev);
|
||||
if (!rval) {
|
||||
ccs_data_parse(&sensor->sdata, fw->data, fw->size, &client->dev,
|
||||
true);
|
||||
rval = ccs_data_parse(&sensor->sdata, fw->data, fw->size,
|
||||
&client->dev, true);
|
||||
release_firmware(fw);
|
||||
if (rval)
|
||||
goto out_power_off;
|
||||
}
|
||||
|
||||
if (!(ccsdev->flags & CCS_DEVICE_FLAG_IS_SMIA) ||
|
||||
|
|
@ -3351,9 +3353,11 @@ static int ccs_probe(struct i2c_client *client)
|
|||
|
||||
rval = request_firmware(&fw, filename, &client->dev);
|
||||
if (!rval) {
|
||||
ccs_data_parse(&sensor->mdata, fw->data, fw->size,
|
||||
&client->dev, true);
|
||||
rval = ccs_data_parse(&sensor->mdata, fw->data,
|
||||
fw->size, &client->dev, true);
|
||||
release_firmware(fw);
|
||||
if (rval)
|
||||
goto out_release_sdata;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user