summaryrefslogtreecommitdiff
path: root/include/linux/i2c/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2026-01-08 22:57:22 +0300
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2026-01-12 04:41:48 +0200
commit37d2e108de4d39172aa0c371ec991855d4cc0241 (patch)
treea46ccf0c820075cbc0c34fcfbe7f2ee32f678a48 /include/linux/i2c/git@git.tavy.me:linux.git
parent1338e8ae4084e55c0359a79e617b2ae183d01579 (diff)
drm/msm: remove some dead code
This is supposed to test for integer overflow but it is wrong and unnecessary. The size_add()/mul() macros return SIZE_MAX when there is an integer overflow. This code saves the SIZE_MAX to a u64 and then tests if the result is greater than SIZE_MAX which it never will be. Fortunately, when we try to allocate SIZE_MAX bytes the allocation will fail. We even pass __GFP_NOWARN so the allocation fails harmlessly and quietly. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Fixes: 2e6a8a1fe2b2 ("drm/msm: Add VM_BIND ioctl") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/697596/ Link: https://lore.kernel.org/r/aWAMIhZLxUcecbLd@stanley.mountain Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions