Ruan Jinjie
2023-Aug-09 03:44 UTC
[Nouveau] [PATCH -next 0/7] drm: Remove many unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() or kunit_kzalloc() first is not necessary, because if the kzalloc() or kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Ruan Jinjie (7): drm/amdkfd: Remove unnecessary NULL values drm/amd/display: Remove unnecessary NULL values drm/msm: Remove unnecessary NULL values drm/radeon: Remove unnecessary NULL values drm/virtio: Remove an unnecessary NULL value drm/format-helper: Remove unnecessary NULL values drm: Remove unnecessary NULL values drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 4 +-- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 4 +-- .../drm/amd/display/dc/bios/bios_parser2.c | 4 +-- drivers/gpu/drm/drm_agpsupport.c | 2 +- drivers/gpu/drm/drm_atomic_uapi.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 +- drivers/gpu/drm/radeon/radeon_agp.c | 2 +- drivers/gpu/drm/radeon/radeon_combios.c | 6 ++-- .../gpu/drm/radeon/radeon_legacy_encoders.c | 4 +-- .../gpu/drm/tests/drm_format_helper_test.c | 28 +++++++++---------- drivers/gpu/drm/virtio/virtgpu_submit.c | 2 +- 14 files changed, 33 insertions(+), 33 deletions(-) -- 2.34.1
Ruan Jinjie
2023-Aug-09 03:44 UTC
[Nouveau] [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() first is not necessary, because if the kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com> --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c index 863cf060af48..d01bb57733b3 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c @@ -48,7 +48,7 @@ int pipe_priority_map[] = { struct kfd_mem_obj *allocate_hiq_mqd(struct kfd_node *dev, struct queue_properties *q) { - struct kfd_mem_obj *mqd_mem_obj = NULL; + struct kfd_mem_obj *mqd_mem_obj; mqd_mem_obj = kzalloc(sizeof(struct kfd_mem_obj), GFP_KERNEL); if (!mqd_mem_obj) @@ -64,7 +64,7 @@ struct kfd_mem_obj *allocate_hiq_mqd(struct kfd_node *dev, struct queue_properti struct kfd_mem_obj *allocate_sdma_mqd(struct kfd_node *dev, struct queue_properties *q) { - struct kfd_mem_obj *mqd_mem_obj = NULL; + struct kfd_mem_obj *mqd_mem_obj; uint64_t offset; mqd_mem_obj = kzalloc(sizeof(struct kfd_mem_obj), GFP_KERNEL); -- 2.34.1
Ruan Jinjie
2023-Aug-09 03:44 UTC
[Nouveau] [PATCH -next 2/7] drm/amd/display: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() first is not necessary, because if the kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com> --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c index 4f005ae1516c..6b3190447581 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c @@ -96,7 +96,7 @@ struct dc_bios *bios_parser_create( struct bp_init_data *init, enum dce_version dce_version) { - struct bios_parser *bp = NULL; + struct bios_parser *bp; bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL); if (!bp) @@ -2576,7 +2576,7 @@ static struct integrated_info *bios_parser_create_integrated_info( struct dc_bios *dcb) { struct bios_parser *bp = BP_FROM_DCB(dcb); - struct integrated_info *info = NULL; + struct integrated_info *info; info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL); diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c index 540d19efad8f..c7b3359f1e1d 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c @@ -3086,7 +3086,7 @@ static struct integrated_info *bios_parser_create_integrated_info( struct dc_bios *dcb) { struct bios_parser *bp = BP_FROM_DCB(dcb); - struct integrated_info *info = NULL; + struct integrated_info *info; info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL); @@ -3675,7 +3675,7 @@ struct dc_bios *firmware_parser_create( struct bp_init_data *init, enum dce_version dce_version) { - struct bios_parser *bp = NULL; + struct bios_parser *bp; bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL); if (!bp) -- 2.34.1
Ruan Jinjie
2023-Aug-09 03:44 UTC
[Nouveau] [PATCH -next 3/7] drm/msm: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() first is not necessary, because if the kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com> --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 8ce7586e2ddf..3c475f8042b0 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -1466,7 +1466,7 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane, struct msm_drm_private *priv = dev->dev_private; struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms); struct drm_crtc *crtc = NULL; - struct dpu_crtc *dpu_crtc = NULL; + struct dpu_crtc *dpu_crtc; int i, ret; dpu_crtc = kzalloc(sizeof(*dpu_crtc), GFP_KERNEL); diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c index 56a3063545ec..b68682c1b5bc 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c @@ -379,7 +379,7 @@ struct mdp5_smp *mdp5_smp_init(struct mdp5_kms *mdp5_kms, const struct mdp5_smp_ { struct mdp5_smp_state *state; struct mdp5_global_state *global_state; - struct mdp5_smp *smp = NULL; + struct mdp5_smp *smp; int ret; smp = kzalloc(sizeof(*smp), GFP_KERNEL); -- 2.34.1
Ruan Jinjie
2023-Aug-09 03:44 UTC
[Nouveau] [PATCH -next 4/7] drm/radeon: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() first is not necessary, because if the kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com> --- drivers/gpu/drm/radeon/radeon_agp.c | 2 +- drivers/gpu/drm/radeon/radeon_combios.c | 6 +++--- drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c index d124600b5f58..a3d749e350f9 100644 --- a/drivers/gpu/drm/radeon/radeon_agp.c +++ b/drivers/gpu/drm/radeon/radeon_agp.c @@ -130,7 +130,7 @@ static struct radeon_agpmode_quirk radeon_agpmode_quirk_list[] = { struct radeon_agp_head *radeon_agp_head_init(struct drm_device *dev) { struct pci_dev *pdev = to_pci_dev(dev->dev); - struct radeon_agp_head *head = NULL; + struct radeon_agp_head *head; head = kzalloc(sizeof(*head), GFP_KERNEL); if (!head) diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index 795c3667f6d6..2620efc7c675 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c @@ -863,7 +863,7 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct struct radeon_device *rdev = dev->dev_private; uint16_t dac_info; uint8_t rev, bg, dac; - struct radeon_encoder_primary_dac *p_dac = NULL; + struct radeon_encoder_primary_dac *p_dac; int found = 0; p_dac = kzalloc(sizeof(struct radeon_encoder_primary_dac), @@ -1014,7 +1014,7 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct struct radeon_device *rdev = dev->dev_private; uint16_t dac_info; uint8_t rev, bg, dac; - struct radeon_encoder_tv_dac *tv_dac = NULL; + struct radeon_encoder_tv_dac *tv_dac; int found = 0; tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL); @@ -1100,7 +1100,7 @@ static struct radeon_encoder_lvds *radeon_legacy_get_lvds_info_from_regs(struct radeon_device *rdev) { - struct radeon_encoder_lvds *lvds = NULL; + struct radeon_encoder_lvds *lvds; uint32_t fp_vert_stretch, fp_horz_stretch; uint32_t ppll_div_sel, ppll_val; uint32_t lvds_ss_gen_cntl = RREG32(RADEON_LVDS_SS_GEN_CNTL); diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index 601d35d34eab..c4350ac2b3d2 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -1692,7 +1692,7 @@ static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon { struct drm_device *dev = encoder->base.dev; struct radeon_device *rdev = dev->dev_private; - struct radeon_encoder_int_tmds *tmds = NULL; + struct radeon_encoder_int_tmds *tmds; bool ret; tmds = kzalloc(sizeof(struct radeon_encoder_int_tmds), GFP_KERNEL); @@ -1715,7 +1715,7 @@ static struct radeon_encoder_ext_tmds *radeon_legacy_get_ext_tmds_info(struct ra { struct drm_device *dev = encoder->base.dev; struct radeon_device *rdev = dev->dev_private; - struct radeon_encoder_ext_tmds *tmds = NULL; + struct radeon_encoder_ext_tmds *tmds; bool ret; if (rdev->is_atom_bios) -- 2.34.1
Ruan Jinjie
2023-Aug-09 03:44 UTC
[Nouveau] [PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value
The NULL initialization of the pointer assigned by kzalloc() first is not necessary, because if the kzalloc() failed, the pointer will be assigned NULL, otherwise it works as usual. so remove it. Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com> --- drivers/gpu/drm/virtio/virtgpu_submit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_submit.c b/drivers/gpu/drm/virtio/virtgpu_submit.c index 3c00135ead45..82563dbec2ab 100644 --- a/drivers/gpu/drm/virtio/virtgpu_submit.c +++ b/drivers/gpu/drm/virtio/virtgpu_submit.c @@ -274,7 +274,7 @@ static int virtio_gpu_fence_event_create(struct drm_device *dev, struct virtio_gpu_fence *fence, u32 ring_idx) { - struct virtio_gpu_fence_event *e = NULL; + struct virtio_gpu_fence_event *e; int ret; e = kzalloc(sizeof(*e), GFP_KERNEL); -- 2.34.1
Ruan Jinjie
2023-Aug-09 03:44 UTC
[Nouveau] [PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kunit_kzalloc() first is not necessary, because if kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com> --- .../gpu/drm/tests/drm_format_helper_test.c | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c index 474bb7a1c4ee..1db12d8ed23c 100644 --- a/drivers/gpu/drm/tests/drm_format_helper_test.c +++ b/drivers/gpu/drm/tests/drm_format_helper_test.c @@ -452,7 +452,7 @@ static size_t conversion_buf_size(u32 dst_format, unsigned int dst_pitch, static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_size) { - u16 *dst = NULL; + u16 *dst; int n; dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL); @@ -467,7 +467,7 @@ static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_siz static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_size) { - u32 *dst = NULL; + u32 *dst; int n; dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL); @@ -482,7 +482,7 @@ static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_siz static __le32 *cpubuf_to_le32(struct kunit *test, const u32 *buf, size_t buf_size) { - __le32 *dst = NULL; + __le32 *dst; int n; dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL); @@ -509,7 +509,7 @@ static void drm_test_fb_xrgb8888_to_gray8(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_gray8_result *result = ¶ms->gray8_result; size_t dst_size; - u8 *buf = NULL; + u8 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -539,7 +539,7 @@ static void drm_test_fb_xrgb8888_to_rgb332(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_rgb332_result *result = ¶ms->rgb332_result; size_t dst_size; - u8 *buf = NULL; + u8 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -569,7 +569,7 @@ static void drm_test_fb_xrgb8888_to_rgb565(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_rgb565_result *result = ¶ms->rgb565_result; size_t dst_size; - u16 *buf = NULL; + u16 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -605,7 +605,7 @@ static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_xrgb1555_result *result = ¶ms->xrgb1555_result; size_t dst_size; - u16 *buf = NULL; + u16 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -636,7 +636,7 @@ static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_argb1555_result *result = ¶ms->argb1555_result; size_t dst_size; - u16 *buf = NULL; + u16 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -667,7 +667,7 @@ static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_rgba5551_result *result = ¶ms->rgba5551_result; size_t dst_size; - u16 *buf = NULL; + u16 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -698,7 +698,7 @@ static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_rgb888_result *result = ¶ms->rgb888_result; size_t dst_size; - u8 *buf = NULL; + u8 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -732,7 +732,7 @@ static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_argb8888_result *result = ¶ms->argb8888_result; size_t dst_size; - u32 *buf = NULL; + u32 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -763,7 +763,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_xrgb2101010_result *result = ¶ms->xrgb2101010_result; size_t dst_size; - u32 *buf = NULL; + u32 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -794,7 +794,7 @@ static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_argb2101010_result *result = ¶ms->argb2101010_result; size_t dst_size; - u32 *buf = NULL; + u32 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; @@ -825,7 +825,7 @@ static void drm_test_fb_xrgb8888_to_mono(struct kunit *test) const struct convert_xrgb8888_case *params = test->param_value; const struct convert_to_mono_result *result = ¶ms->mono_result; size_t dst_size; - u8 *buf = NULL; + u8 *buf; __le32 *xrgb8888 = NULL; struct iosys_map dst, src; -- 2.34.1
Ruan Jinjie
2023-Aug-09 03:44 UTC
[Nouveau] [PATCH -next 7/7] drm: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() first is not necessary, because if the kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com> --- drivers/gpu/drm/drm_agpsupport.c | 2 +- drivers/gpu/drm/drm_atomic_uapi.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index a4ad6fd13abc..158709849481 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c @@ -384,7 +384,7 @@ int drm_legacy_agp_free_ioctl(struct drm_device *dev, void *data, struct drm_agp_head *drm_legacy_agp_init(struct drm_device *dev) { struct pci_dev *pdev = to_pci_dev(dev->dev); - struct drm_agp_head *head = NULL; + struct drm_agp_head *head; head = kzalloc(sizeof(*head), GFP_KERNEL); if (!head) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 98d3b10c08ae..5a433af75132 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -942,7 +942,7 @@ int drm_atomic_get_property(struct drm_mode_object *obj, static struct drm_pending_vblank_event *create_vblank_event( struct drm_crtc *crtc, uint64_t user_data) { - struct drm_pending_vblank_event *e = NULL; + struct drm_pending_vblank_event *e; e = kzalloc(sizeof *e, GFP_KERNEL); if (!e) diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index ea9f66037600..419d0afccdb9 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c @@ -695,7 +695,7 @@ static int exynos_drm_ipp_task_setup_buffers(struct exynos_drm_ipp_task *task, static int exynos_drm_ipp_event_create(struct exynos_drm_ipp_task *task, struct drm_file *file_priv, uint64_t user_data) { - struct drm_pending_exynos_ipp_event *e = NULL; + struct drm_pending_exynos_ipp_event *e; int ret; e = kzalloc(sizeof(*e), GFP_KERNEL); diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c index 670c9739e5e1..9accb2a12719 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c @@ -789,7 +789,7 @@ nv17_tv_create(struct drm_connector *connector, struct dcb_output *entry) { struct drm_device *dev = connector->dev; struct drm_encoder *encoder; - struct nv17_tv_encoder *tv_enc = NULL; + struct nv17_tv_encoder *tv_enc; tv_enc = kzalloc(sizeof(*tv_enc), GFP_KERNEL); if (!tv_enc) -- 2.34.1
Dmitry Baryshkov
2023-Oct-08 14:01 UTC
[Nouveau] [PATCH -next 0/7] drm: Remove many unnecessary NULL values
On Wed, 09 Aug 2023 11:44:38 +0800, Ruan Jinjie wrote:> The NULL initialization of the pointers assigned by kzalloc() or > kunit_kzalloc() first is not necessary, because if the kzalloc() or > kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise > it works as usual. so remove it. > > Ruan Jinjie (7): > drm/amdkfd: Remove unnecessary NULL values > drm/amd/display: Remove unnecessary NULL values > drm/msm: Remove unnecessary NULL values > drm/radeon: Remove unnecessary NULL values > drm/virtio: Remove an unnecessary NULL value > drm/format-helper: Remove unnecessary NULL values > drm: Remove unnecessary NULL values > > [...]Applied, thanks! [3/7] drm/msm: Remove unnecessary NULL values gitlab.freedesktop.org/lumag/msm/-/commit/92a48b6ed510 Best regards, -- Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
Maybe Matching Threads
- [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
- [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
- [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
- [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
- [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values