Skip to content

Commit 0fd68f2

Browse files
Sakari Ailusmchehab
authored andcommitted
[media] smiapp: Clean up smiapp_get_pdata()
Don't set rval when it's not used (the function returns a pointer to struct smiapp_platform_data). Signed-off-by: Sakari Ailus <[email protected]> Acked-by: Lad, Prabhakar <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent c4c0283 commit 0fd68f2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/media/i2c/smiapp/smiapp-core.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,10 +2988,8 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
29882988
return NULL;
29892989

29902990
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
2991-
if (!pdata) {
2992-
rval = -ENOMEM;
2991+
if (!pdata)
29932992
goto out_err;
2994-
}
29952993

29962994
v4l2_of_parse_endpoint(ep, &bus_cfg);
29972995

@@ -3001,7 +2999,6 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
30012999
break;
30023000
/* FIXME: add CCP2 support. */
30033001
default:
3004-
rval = -EINVAL;
30053002
goto out_err;
30063003
}
30073004

0 commit comments

Comments
 (0)