vpfe_dev->clks = kzalloc(vpfe_cfg->num_clocks *
sizeof(struct clock *), GFP_KERNEL);
- if (vpfe_dev->clks == NULL) {
- v4l2_err(vpfe_dev->pdev->driver, "Memory allocation failed\n");
+ if (vpfe_dev->clks == NULL)
return -ENOMEM;
- }
for (i = 0; i < vpfe_cfg->num_clocks; i++) {
if (vpfe_cfg->clocks[i] == NULL) {
num_subdevs = vpfe_cfg->num_subdevs;
vpfe_dev->sd =
kzalloc(sizeof(struct v4l2_subdev *)*num_subdevs, GFP_KERNEL);
- if (vpfe_dev->sd == NULL) {
- v4l2_err(&vpfe_dev->v4l2_dev,
- "unable to allocate memory for subdevice\n");
+ if (vpfe_dev->sd == NULL)
return -ENOMEM;
- }
for (i = 0, k = 0; i < num_subdevs; i++) {
sdinfo = &vpfe_cfg->sub_devs[i];
int ret = -ENOMEM;
vpfe_dev = kzalloc(sizeof(*vpfe_dev), GFP_KERNEL);
- if (!vpfe_dev) {
- v4l2_err(pdev->dev.driver,
- "Failed to allocate memory for vpfe_dev\n");
+ if (!vpfe_dev)
return ret;
- }
if (pdev->dev.platform_data == NULL) {
v4l2_err(pdev->dev.driver, "Unable to get vpfe config\n");