mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
drm/msm: Remove redundant SIZE_MAX check
kmalloc() will already fail and return NULL if passed SIZE_MAX. Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/743082/ Message-ID: <20260729155609.20190-7-robin.clark@oss.qualcomm.com>
This commit is contained in:
parent
9ee2884ed5
commit
0369a2619c
|
|
@ -250,11 +250,6 @@ static int submit_lookup_cmds(struct msm_gem_submit *submit,
|
|||
|
||||
sz = array_size(submit_cmd.nr_relocs,
|
||||
sizeof(struct drm_msm_gem_submit_reloc));
|
||||
/* check for overflow: */
|
||||
if (sz == SIZE_MAX) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
submit->cmd[i].relocs = kmalloc(sz, GFP_KERNEL | __GFP_NOWARN);
|
||||
if (!submit->cmd[i].relocs) {
|
||||
ret = -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user