Staging: media: davinci_vpfe: Removed unnecessary out of memory message logging.
The following patch removes the checkpatch.pl warning: WARNING: possible unnecessary out of memory message. Signed-off-by: Heena Sirwani <heenasirwani@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fb67f44549
commit
31907c0e5c
@ -228,10 +228,8 @@ static int vpfe_enable_clock(struct vpfe_device *vpfe_dev)
|
||||
|
||||
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) {
|
||||
@ -349,11 +347,8 @@ static int register_i2c_devices(struct vpfe_device *vpfe_dev)
|
||||
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];
|
||||
@ -582,11 +577,8 @@ static int vpfe_probe(struct platform_device *pdev)
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user