[PATCH v2] base: dd: fix error return code of driver_sysfs_add()

2021-03-23 Thread Jia-Ju Bai
When device_create_file() fails and returns a non-zero value, no error return code of driver_sysfs_add() is assigned. To fix this bug, ret is assigned with the return value of device_create_file(), and then ret is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- v2: * Fix

Re: [PATCH] base: dd: fix error return code of driver_sysfs_add()

2021-03-23 Thread Jia-Ju Bai
On 2021/3/23 21:57, Greg KH wrote: On Fri, Mar 05, 2021 at 02:24:05AM -0800, Jia-Ju Bai wrote: When device_create_file() fails and returns a non-zero value, no error return code of driver_sysfs_add() is assigned. To fix this bug, ret is assigned with the return value of device_create_file

[PATCH v2] usb: gadget: legacy: fix error return code of msg_bind()

2021-03-23 Thread Jia-Ju Bai
When usb_otg_descriptor_alloc() returns NULL to usb_desc, no error return code of msg_bind() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- v2: * Fix a mistake in the report. Thank Greg for good advice

Re: [PATCH] usb: gadget: legacy: fix error return code of msg_bind()

2021-03-23 Thread Jia-Ju Bai
On 2021/3/23 19:35, Greg KH wrote: On Sun, Mar 07, 2021 at 12:49:15AM -0800, Jia-Ju Bai wrote: When usb_otg_descriptor_alloc() returns NULL to usb_desc, no error return code of msg_bind() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot

[PATCH v2] thermal: thermal_of: fix error return code of thermal_of_populate_bind_params()

2021-03-10 Thread Jia-Ju Bai
("of: thermal: Allow multiple devices to share cooling map") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- v2: * Add the fixing about of_count_phandle_with_args() and the fixes tag. Thank Daniel Lezcano for good advice. --- drivers/thermal/thermal_of.c | 7 +-- 1 file changed, 5

Re: [PATCH] thermal: thermal_of: fix error return code of thermal_of_populate_bind_params()

2021-03-10 Thread Jia-Ju Bai
On 2021/3/10 20:02, Daniel Lezcano wrote: On 06/03/2021 15:11, Jia-Ju Bai wrote: When kcalloc() fails and __tcbp is NULL, no error return code of thermal_of_populate_bind_params() is assigned. To fix this bug, ret is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off

Re: [PATCH] net: bonding: fix error return code of bond_neigh_init()

2021-03-10 Thread Jia-Ju Bai
On 2021/3/10 17:24, Roi Dayan wrote: On 2021-03-08 5:11 AM, Jia-Ju Bai wrote: When slave is NULL or slave_ops->ndo_neigh_setup is NULL, no error return code of bond_neigh_init() is assigned. To fix this bug, ret is assigned with -EINVAL in these cases. Fixes: 9e99bfefdbce ("bond

[PATCH v2] block: rsxx: fix error return code of rsxx_pci_probe()

2021-03-09 Thread Jia-Ju Bai
When create_singlethread_workqueue returns NULL to card->event_wq, no error return code of rsxx_pci_probe() is assigned. To fix this bug, st is assigned with -ENOMEM in this case. Fixes: 8722ff8cdbfa ("block: IBM RamSan 70/80 device driver") Reported-by: TOTE Robot Signed-off-b

Re: [PATCH] usb: renesas_usbhs: fix error return code of usbhsf_pkt_handler()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/10 10:54, Yoshihiro Shimoda wrote: Hi Jia-Ju, From: Jia-Ju Bai, Sent: Tuesday, March 9, 2021 10:39 PM On 2021/3/9 19:59, Yoshihiro Shimoda wrote: Hi Jia-Ju, Thank you for the patch! From: Jia-Ju Bai, Sent: Sunday, March 7, 2021 6:01 PM When __usbhsf_pkt_get() returns NULL

Re: [PATCH] block: rsxx: fix error return code of rsxx_pci_probe()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/10 4:59, Jens Axboe wrote: On 3/8/21 3:05 AM, Jia-Ju Bai wrote: Some error handling segments of rsxx_pci_probe() do not return error code, so add error code for these segments. Fixes: 8722ff8cdbfa ("block: IBM RamSan 70/80 device driver") Reported-by: TOTE Robot

Re: [PATCH] fs: proc: fix error return code of proc_map_files_readdir()

2021-03-09 Thread Jia-Ju Bai
lse report... Best wishes, Jia-Ju Bai

Re: [BUG] memstick: core: missing error return code in msb_resume()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/9 16:44, Ulf Hansson wrote: On Fri, 5 Mar 2021 at 03:45, Jia-Ju Bai wrote: My static analysis tool reports that no error return code is assigned in error handling code of msb_resume(). However, many other drivers assign error return code in xxx_resume(), such as sky2_resume

Re: [PATCH] usb: renesas_usbhs: fix error return code of usbhsf_pkt_handler()

2021-03-09 Thread Jia-Ju Bai
Thanks for the reply! On 2021/3/9 19:59, Yoshihiro Shimoda wrote: Hi Jia-Ju, Thank you for the patch! From: Jia-Ju Bai, Sent: Sunday, March 7, 2021 6:01 PM When __usbhsf_pkt_get() returns NULL to pkt, no error return code of usbhsf_pkt_handler() is assigned. Yes. Also I realized

Re: [PATCH] block: keyslot-manager: fix error return code of blk_ksm_evict_key()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/9 19:45, Satya Tangirala wrote: On Tue, Mar 09, 2021 at 01:18:12AM -0800, Jia-Ju Bai wrote: When blk_ksm_find_keyslot() returns NULL to slot, no error return code of blk_ksm_evict_key() is assigned. To fix this bug, err is assigned with -ENOENT in this case. Fixes: 1b2628397058

Re: [PATCH] net: bridge: fix error return code of do_update_counters()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/9 19:01, Florian Westphal wrote: Jia-Ju Bai wrote: When find_table_lock() returns NULL to t, no error return code of do_update_counters() is assigned. Its -ENOENT. t = find_table_lock(net, name, , _mutex); ^ ret is passed

[PATCH] fs: proc: fix error return code of proc_map_files_readdir()

2021-03-09 Thread Jia-Ju Bai
When get_task_mm() returns NULL to mm, no error return code of proc_map_files_readdir() is assigned. To fix this bug, ret is assigned with -ENOENT in this case. Fixes: f0c3b5093add ("[readdir] convert procfs") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- fs/proc/base.c |

[BUG] Possible bug of missing error return code in __ext4_journalled_writepage()

2021-03-09 Thread Jia-Ju Bai
with an error code like -ENOENT. I wonder whether this is intentional? Or ret should be assigned with -ENOENT here? Best wishes, Jia-Ju Bai

[PATCH] block: keyslot-manager: fix error return code of blk_ksm_evict_key()

2021-03-09 Thread Jia-Ju Bai
When blk_ksm_find_keyslot() returns NULL to slot, no error return code of blk_ksm_evict_key() is assigned. To fix this bug, err is assigned with -ENOENT in this case. Fixes: 1b2628397058 ("block: Keyslot Manager for Inline Encryption") Reported-by: TOTE Robot Signed-off-by:

Re: [PATCH] net: netlink: fix error return code of netlink_proto_init()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/9 16:47, Heiner Kallweit wrote: On 09.03.2021 09:33, Jia-Ju Bai wrote: When kcalloc() returns NULL to nl_table, no error return code of netlink_proto_init() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Didn't we talk enough about your incorrect patches

[PATCH] kernel: profile: fix error return code of create_proc_profile()

2021-03-09 Thread Jia-Ju Bai
When proc_create() returns NULL to entry, no error return code of create_proc_profile() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: e722d8daafb9 ("profile: Convert to hotplug state machine") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai -

[PATCH] kernel: kexec_file: fix error return code of kexec_calculate_store_digests()

2021-03-09 Thread Jia-Ju Bai
When vzalloc() returns NULL to sha_regions, no error return code of kexec_calculate_store_digests() is assigned. To fix this bug, ret is assigned with -ENOMEM in this case. Fixes: a43cac0d9dc2 ("kexec: split kexec_file syscall code to kexec_file.c") Reported-by: TOTE Robot Signed-off-

[PATCH] net: netlink: fix error return code of netlink_proto_init()

2021-03-09 Thread Jia-Ju Bai
When kcalloc() returns NULL to nl_table, no error return code of netlink_proto_init() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: fab2caf62ed0 ("[NETLINK]: Call panic if nl_table allocation fails") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

Re: [PATCH] net: mellanox: mlx5: fix error return code of mlx5e_stats_flower()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/9 16:24, Roi Dayan wrote: On 2021-03-09 10:20 AM, Roi Dayan wrote: On 2021-03-06 3:47 PM, Jia-Ju Bai wrote: When mlx5e_tc_get_counter() returns NULL to counter or mlx5_devcom_get_peer_data() returns NULL to peer_esw, no error return code of mlx5e_stats_flower() is assigned

[PATCH] fs: orangefs: fix error return code of orangefs_revalidate_lookup()

2021-03-09 Thread Jia-Ju Bai
Signed-off-by: Jia-Ju Bai --- fs/orangefs/dcache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index fe484cf93e5c..8bbe9486e3a6 100644 --- a/fs/orangefs/dcache.c +++ b/fs/orangefs/dcache.c @@ -26,8 +26,10 @@

[PATCH] net: bridge: fix error return code of do_update_counters()

2021-03-08 Thread Jia-Ju Bai
When find_table_lock() returns NULL to t, no error return code of do_update_counters() is assigned. To fix this bug, ret is assigned with -ENOENT in this case. Fixes: 49facff9f925 ("netfilter: ebtables: split update_counters into two functions") Reported-by: TOTE Robot Signed-off-by:

Re: [PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
On 2021/3/8 21:33, Heiner Kallweit wrote: On 08.03.2021 13:18, Jia-Ju Bai wrote: On 2021/3/8 18:19, Heiner Kallweit wrote: On 08.03.2021 10:31, Jia-Ju Bai wrote: When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err

Re: [PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
On 2021/3/8 18:19, Heiner Kallweit wrote: On 08.03.2021 10:31, Jia-Ju Bai wrote: When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Please stop sending such nonsense. Basically all

[PATCH] block: rsxx: fix error return code of rsxx_pci_probe()

2021-03-08 Thread Jia-Ju Bai
Some error handling segments of rsxx_pci_probe() do not return error code, so add error code for these segments. Fixes: 8722ff8cdbfa ("block: IBM RamSan 70/80 device driver") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/block/rsxx/core.c | 18 +++-

[PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: 78f821b64826 ("ieee802154: socket: put handling into one file") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH] net: ieee802154: fix error return code of raw_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of raw_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: 78f821b64826 ("ieee802154: socket: put handling into one file") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

Re: [PATCH] gpu: drm: i915: fix error return code of igt_buddy_alloc_smoke()

2021-03-08 Thread Jia-Ju Bai
On 2021/3/8 17:18, Chris Wilson wrote: Quoting Jia-Ju Bai (2021-03-08 08:59:52) When i915_random_order() returns NULL to order, no error return code of igt_buddy_alloc_smoke() is assigned. To fix this bug, err is assigned with -EINVAL in this case. It would not be EINVAL since that is used

[PATCH] net: qrtr: fix error return code of qrtr_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of qrtr_sendmsg() is assigned. To fix this bug, rc is assigned with -ENOMEM in this case. Fixes: 194ccc88297a ("net: qrtr: Support decoding incoming v2 packets") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai ---

[PATCH] gpu: drm: i915: fix error return code of igt_threaded_blt()

2021-03-08 Thread Jia-Ju Bai
When kcalloc() returns NULL to tsk or thread, no error code of igt_threaded_blt() is returned. To fix this bug, -ENOMEM is returned as error code. Fixes: 0e99f939f08f ("drm/i915/selftests/blt: add some kthreads into the mix") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- d

[PATCH] gpu: drm: i915: fix error return code of igt_buddy_alloc_smoke()

2021-03-08 Thread Jia-Ju Bai
When i915_random_order() returns NULL to order, no error return code of igt_buddy_alloc_smoke() is assigned. To fix this bug, err is assigned with -EINVAL in this case. Fixes: 1fe3818d17c9 ("drm/i915/selftests: try to rein in alloc_smoke") Reported-by: TOTE Robot Signed-off-by:

[PATCH] scsi: mpt3sas: fix error return code of mpt3sas_base_attach()

2021-03-07 Thread Jia-Ju Bai
When kzalloc() returns NULL, no error return code of mpt3sas_base_attach() is assigned. To fix this bug, r is assigned with -ENOMEM in this case. Fixes: c696f7b83ede ("scsi: mpt3sas: Implement device_remove_in_progress check in IOCTL path") Reported-by: TOTE Robot Signed-off-by:

[PATCH] mtd: maps: fix error return code of physmap_flash_remove()

2021-03-07 Thread Jia-Ju Bai
When platform_get_drvdata() returns NULL to info, no error return code of physmap_flash_remove() is assigned. To fix this bug, err is assigned with -EINVAL in this case Fixes: 73566edf9b91 ("[MTD] Convert physmap to platform driver") Reported-by: TOTE Robot Signed-off-by:

[PATCH] scsi: qedi: fix error return code of qedi_alloc_global_queues()

2021-03-07 Thread Jia-Ju Bai
y: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/scsi/qedi/qedi_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 47ad64b06623..69c5b5ee2169 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main

[PATCH] net: bonding: fix error return code of bond_neigh_init()

2021-03-07 Thread Jia-Ju Bai
When slave is NULL or slave_ops->ndo_neigh_setup is NULL, no error return code of bond_neigh_init() is assigned. To fix this bug, ret is assigned with -EINVAL in these cases. Fixes: 9e99bfefdbce ("bonding: fix bond_neigh_init()") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

Re: [PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()

2021-03-07 Thread Jia-Ju Bai
On 2021/3/7 20:47, Chen-Yu Tsai wrote: On Sat, Mar 6, 2021 at 10:15 PM Jia-Ju Bai wrote: When sun6i_video_remote_subdev() returns NULL to subdev, no error return code of sun6i_video_start_streaming() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE

Re: [PATCH] ath: ath6kl: fix error return code of ath6kl_htc_rx_bundle()

2021-03-07 Thread Jia-Ju Bai
be false positives... Best wishes, Jia-Ju Bai On 2021/3/7 17:18, Leon Romanovsky wrote: On Sun, Mar 07, 2021 at 01:07:57AM -0800, Jia-Ju Bai wrote: When hif_scatter_req_get() returns NULL to scat_req, no error return code of ath6kl_htc_rx_bundle() is assigned. To fix this bug, status

[PATCH] gpu: drm: amd: amdgpu: fix error return code of amdgpu_acpi_init()

2021-03-07 Thread Jia-Ju Bai
Add error return code in error hanlding code of amdgpu_acpi_init(). Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu

[PATCH] net: wan: fix error return code of uhdlc_init()

2021-03-07 Thread Jia-Ju Bai
When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of uhdlc_init() is assigned. To fix this bug, ret is assigned with -ENOMEM in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wan/fsl_ucc_hdlc.c | 8 ++-- 1 file changed, 6 insertions

[PATCH] ath: ath6kl: fix error return code of ath6kl_htc_rx_bundle()

2021-03-07 Thread Jia-Ju Bai
When hif_scatter_req_get() returns NULL to scat_req, no error return code of ath6kl_htc_rx_bundle() is assigned. To fix this bug, status is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ath/ath6kl/htc_mbox.c | 4 +++- 1 file

[PATCH] usb: renesas_usbhs: fix error return code of usbhsf_pkt_handler()

2021-03-07 Thread Jia-Ju Bai
When __usbhsf_pkt_get() returns NULL to pkt, no error return code of usbhsf_pkt_handler() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/usb/renesas_usbhs/fifo.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH resend] usb: gadget: legacy: fix error return code of msg_bind()

2021-03-07 Thread Jia-Ju Bai
When usb_otg_descriptor_alloc() returns NULL to usb_desc, no error return code of msg_bind() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai --- drivers/usb/gadget/legacy/mass_storage.c | 4 +++- 1 file changed

[PATCH] usb: gadget: legacy: fix error return code of msg_bind()

2021-03-07 Thread Jia-Ju Bai
When usb_otg_descriptor_alloc() returns NULL to usb_desc, no error return code of msg_bind() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai --- drivers/usb/gadget/legacy/mass_storage.c | 4 +++- 1 file changed

[PATCH] usb: gadget: legacy: fix error return code of multi_bind()

2021-03-07 Thread Jia-Ju Bai
When usb_otg_descriptor_alloc() returns NULL to usb_desc, no error return code of multi_bind() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/usb/gadget/legacy/multi.c | 4 +++- 1 file changed, 3

[PATCH] net: hisilicon: hns: fix error return code of hns_nic_clear_all_rx_fetch()

2021-03-07 Thread Jia-Ju Bai
When hns_assemble_skb() returns NULL to skb, no error return code of hns_nic_clear_all_rx_fetch() is assigned. To fix this bug, ret is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 4 +++- 1 file

[PATCH] rsi: fix error return code of rsi_load_9116_firmware()

2021-03-07 Thread Jia-Ju Bai
When kmemdup() returns NULL to ta_firmware, no error return code of rsi_load_9116_firmware() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/rsi/rsi_91x_hal.c | 4 +++- 1 file changed, 3

[PATCH] ti: wlcore: fix error return code of wl1271_cmd_build_ps_poll()

2021-03-07 Thread Jia-Ju Bai
When ieee80211_pspoll_get() returns NULL to skb, no error return code of wl1271_cmd_build_ps_poll() is assigned. To fix this bug, ret is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ti/wlcore/cmd.c | 4 +++- 1 file changed, 3

[PATCH] ti: wlcore: fix error return code of wl1271_suspend()

2021-03-06 Thread Jia-Ju Bai
When wl is NULL, no error return code of wl1271_suspend() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ti/wlcore/sdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net

[PATCH] media: tuners: fix error return code of hybrid_tuner_request_state()

2021-03-06 Thread Jia-Ju Bai
When kzalloc() fails and state is NULL, no error return code is assigned. To fix this bug, __ret is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/media/tuners/tuner-i2c.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()

2021-03-06 Thread Jia-Ju Bai
When sun6i_video_remote_subdev() returns NULL to subdev, no error return code of sun6i_video_start_streaming() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4

[PATCH] thermal: thermal_of: fix error return code of thermal_of_populate_bind_params()

2021-03-06 Thread Jia-Ju Bai
When kcalloc() fails and __tcbp is NULL, no error return code of thermal_of_populate_bind_params() is assigned. To fix this bug, ret is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/thermal/thermal_of.c | 4 +++- 1 file changed, 3 insertions

[PATCH] net: mellanox: mlxsw: fix error return code of mlxsw_sp_router_nve_promote_decap()

2021-03-06 Thread Jia-Ju Bai
When fib_entry is NULL, no error return code of mlxsw_sp_router_nve_promote_decap() is assigned. To fix this bug, err is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 +++- 1 file changed, 3

[PATCH] infiniband: hw: cxgb4: fix error return code of close_listsrv_rpl()

2021-03-06 Thread Jia-Ju Bai
When ep is NULL, no error code of close_listsrv_rpl() is returned. To fix this bug, close_listsrv_rpl() returns -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] infiniband: hw: cxgb4: fix error return code of pass_open_rpl()

2021-03-06 Thread Jia-Ju Bai
When ep is NULL, no error code of pass_open_rpl() is returned. To fix this bug, pass_open_rpl() returns -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] net: mellanox: mlx5: fix error return code of mlx5e_stats_flower()

2021-03-06 Thread Jia-Ju Bai
When mlx5e_tc_get_counter() returns NULL to counter or mlx5_devcom_get_peer_data() returns NULL to peer_esw, no error return code of mlx5e_stats_flower() is assigned. To fix this bug, err is assigned with -EINVAL in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers

[PATCH] rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data()

2021-03-06 Thread Jia-Ju Bai
When idr_find() returns NULL to intent, no error return code of qcom_glink_rx_data() is assigned. To fix this bug, ret is assigned with -ENOENT in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH] interconnect: core: fix error return code of icc_link_destroy()

2021-03-06 Thread Jia-Ju Bai
When krealloc() fails and new is NULL, no error return code of icc_link_destroy() is assigned. To fix this bug, ret is assigned with -ENOMEM hen new is NULL. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/interconnect/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH] staging: vc04_services: vchiq_arm: fix error return code of vchiq_release_internal() and vchiq_use_internal()

2021-03-06 Thread Jia-Ju Bai
When arm_state is NULL, no error return code of vchiq_release_internal() and vchiq_use_internal() is assigned. To fix this bug, ret is assigned with VCHIQ_ERROR. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 8 ++-- 1 file

[PATCH] security: tomoyo: fix error return code of tomoyo_update_domain()

2021-03-06 Thread Jia-Ju Bai
When mutex_lock_interruptible() fails, the error return code of tomoyo_update_domain() is not properly assigned. To fix this bug, error is assigned with the return value of mutex_lock_interruptible(), and then error is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- security

[PATCH] pinctrl: ti: fix error return code of ti_iodelay_probe()

2021-03-06 Thread Jia-Ju Bai
When ti_iodelay_pinconf_init_dev() fails, no error return code of ti_iodelay_probe() is assigned. To fix this bug, ret is assigned with the return value of ti_iodelay_pinconf_init_dev(), and then ret is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/pinctrl/ti/pinctrl

[PATCH] base: dd: fix error return code of driver_sysfs_add()

2021-03-05 Thread Jia-Ju Bai
When device_create_file() fails and returns a non-zero value, no error return code of driver_sysfs_add() is assigned. To fix this bug, ret is assigned with the return value of device_create_file(), and then ret is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/base

[PATCH] net: smc: fix error return code of smc_diag_dump_proto()

2021-03-05 Thread Jia-Ju Bai
When the list of head is empty, no error return code of smc_diag_dump_proto() is assigned. To fix this bug, rc is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- net/smc/smc_diag.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH] scsi: ufs: fix error return code of exynos_ufs_get_clk_info()

2021-03-05 Thread Jia-Ju Bai
When the list of head is empty, no error return code of exynos_ufs_get_clk_info() is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/scsi/ufs/ufs-exynos.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] scsi: ufs: fix error return code of ufshcd_set_clk_freq()

2021-03-05 Thread Jia-Ju Bai
When the list of head is empty, no error return code of ufshcd_set_clk_freq() is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/scsi/ufs/ufshcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH] scsi: ufs: fix error return code of ufshcd_devfreq_target()

2021-03-05 Thread Jia-Ju Bai
When the list of clk_list is empty, no error return code of ufshcd_devfreq_target() is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] scsi: ufs: fix error return code of ufshcd_init_clocks()

2021-03-05 Thread Jia-Ju Bai
When the list of head is empty, no error return code of ufshcd_init_clocks() is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/scsi/ufs/ufshcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH] media: platform: xilinx: fix error return code of xvip_graph_init()

2021-03-05 Thread Jia-Ju Bai
When the list of xdev->notifier.asd_list is empty, no error return code of xvip_graph_init() is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/media/platform/xilinx/xilinx-vipp.c | 1 + 1 file chan

[PATCH] fs: btrfs: fix error return code of btrfs_recover_relocation()

2021-03-05 Thread Jia-Ju Bai
When the list of reloc_roots is empty, no error return code of btrfs_recover_relocation() is assigned. To fix this bug, err is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- fs/btrfs/relocation.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] net: xdp: fix error return code of xsk_generic_xmit()

2021-03-05 Thread Jia-Ju Bai
Robot Signed-off-by: Jia-Ju Bai --- net/xdp/xsk.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 4faabd1ecfd1..f1c1db07dd07 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -484,8 +484,14 @@ static int xsk_generic_xmit(struct sock

[PATCH] scsi: ufs: fix error return code of ufshcd_populate_vreg()

2021-03-05 Thread Jia-Ju Bai
When np is NULL or of_parse_phandle() returns NULL, no error return code of ufshcd_populate_vreg() is assigned. To fix this bug, ret is assigned with -EINVAL or -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/scsi/ufs/ufshcd-pltfrm.c | 2 ++ 1 file

Re: [PATCH] md: bcache: fix error return code of cached_dev_cache_miss()

2021-03-04 Thread Jia-Ju Bai
Hi Coly, Thanks a lot for your detailed explanation :) Best wishes, Jia-Ju Bai On 2021/3/5 12:05, Coly Li wrote: On 3/5/21 10:46 AM, Jia-Ju Bai wrote: When bch_bio_alloc_pages() fails, no error return code of cached_dev_cache_miss() is assigned. To fix this bug, ret is assigned with -ENOMEN

[PATCH] gpu: drm: swsmu: fix error return code of smu_v11_0_set_allowed_mask()

2021-03-04 Thread Jia-Ju Bai
When bitmap_empty() or feature->feature_num triggers an error, no error return code of smu_v11_0_set_allowed_mask() is assigned. To fix this bug, ret is assigned with -EINVAL as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/gpu/drm/amd/pm/swsmu/sm

[PATCH] scsi: wd719x: fix error return code of wd719x_pci_probe()

2021-03-04 Thread Jia-Ju Bai
When dma_set_mask() or pci_iomap() fails, no error return code of wd719x_pci_probe() is assigned. To fix this bug, err is assigned with -EIO as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/scsi/wd719x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH] marvell: libertas_tf: fix error return code of if_usb_prog_firmware()

2021-03-04 Thread Jia-Ju Bai
When check_fwfile_format() fails, no error return code of if_usb_prog_firmware() is assigned. To fix this bug, ret is assigned with -EINVAL as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/marvell/libertas_tf/if_usb.c | 4 +++- 1 file changed, 3

[PATCH] media: i2c: imx274: fix error return code of imx274_s_frame_interval()

2021-03-04 Thread Jia-Ju Bai
When __v4l2_ctrl_modify_range() fails, no error return code of imx274_s_frame_interval() is assigned. To fix this bug, ret is assigned with the return valye of __v4l2_ctrl_modify_range(), and then ret is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/media/i2c/imx274.c

[PATCH] net: intel: iavf: fix error return code of iavf_init_get_resources()

2021-03-04 Thread Jia-Ju Bai
When iavf_process_config() fails, no error return code of iavf_init_get_resources() is assigned. To fix this bug, err is assigned with the return value of iavf_process_config(), and then err is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/intel/iavf

[PATCH] md: bcache: fix error return code of cached_dev_cache_miss()

2021-03-04 Thread Jia-Ju Bai
When bch_bio_alloc_pages() fails, no error return code of cached_dev_cache_miss() is assigned. To fix this bug, ret is assigned with -ENOMEN as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/md/bcache/request.c | 4 +++- 1 file changed, 3 insertions(+), 1

[BUG] memstick: core: missing error return code in msb_resume()

2021-03-04 Thread Jia-Ju Bai
My static analysis tool reports that no error return code is assigned in error handling code of msb_resume(). However, many other drivers assign error return code in xxx_resume(), such as sky2_resume() and e1000_resume(). I wonder whether this is intentional? Best wishes, Jia-Ju Bai

[PATCH] memstick: core: fix error return code of mspro_block_resume()

2021-03-04 Thread Jia-Ju Bai
When mspro_block_init_card() fails, no error return code of mspro_block_resume() is assigned. To fix this bug, rc is assigned with the return value of mspro_block_init_card(), and then rc is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/memstick/core/mspro_block.c

[PATCH] net: tehuti: fix error return code in bdx_probe()

2021-03-04 Thread Jia-Ju Bai
When bdx_read_mac() fails, no error return code of bdx_probe() is assigned. To fix this bug, err is assigned with -EFAULT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/tehuti/tehuti.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] crypto: allwinner: sun8i-ce: fix error return code in sun8i_ce_prng_generate()

2021-03-04 Thread Jia-Ju Bai
When dma_mapping_error() returns an error, no error return code of sun8i_ce_prng_generate() is assigned. To fix this bug, err is assigned with -EFAULT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c | 1 + 1 file

[PATCH] net: mellanox: mlx5: fix error return code in mlx5_fpga_device_start()

2021-03-04 Thread Jia-Ju Bai
When mlx5_is_fpga_lookaside() returns a non-zero value, no error return code is assigned. To fix this bug, err is assigned with -EINVAL as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 4 +++- 1 file changed, 3

[PATCH] staging: media: omap4iss: fix error return code in iss_probe()

2021-03-04 Thread Jia-Ju Bai
When omap4iss_get() returns NULL, no error return code is assigned. To fix this bug, ret is assigned with -EINVAL as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/staging/media/omap4iss/iss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH] hid: hid-alps: fix error return code in alps_input_configured()

2021-03-04 Thread Jia-Ju Bai
When input_register_device() fails, no error return code is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/hid/hid-alps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-alps.c b

Re: [PATCH v2 1/4] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
Thanks for the advice. I have added the description of the changes and resent the patches. Best wishes, Jia-Ju Bai On 2020/11/19 1:20, Larry Finger wrote: On 11/17/20 7:53 PM, Jia-Ju Bai wrote: In rtl88ee_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 677:    dma_add

[PATCH v2 4/4 resend] rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
t;frame_control is accessed on line 535: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- v2: * Use "rtlwifi" as subject pref

[PATCH v2 2/4 resend] rtlwifi: rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
rol is accessed on line 534: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- v2: * Use "rtlwifi" as subject pref

[PATCH v2 3/4 resend] rtlwifi: rtl8192de: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
rol is accessed on line 670: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- v2: * Use "rtlwifi" as subject pref

[PATCH v2 1/4 resend] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
rol is accessed on line 681: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- v2: * Use "rtlwifi" as subject pref

[PATCH v2 4/4] rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
t;frame_control is accessed on line 535: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx

Re: [PATCH] rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
On 2020/11/7 19:44, Kalle Valo wrote: Jia-Ju Bai wrote: In rtl92ce_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 530: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 533, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr

[PATCH v2 1/4] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
rol is accessed on line 681: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx

[PATCH v2 3/4] rtlwifi: rtl8192de: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
rol is accessed on line 670: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx

[PATCH v2 2/4] rtlwifi: rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
rol is accessed on line 534: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx

[PATCH] rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-10-18 Thread Jia-Ju Bai
rol is accessed on line 681: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx

[PATCH] rtl8723ae: avoid accessing the data mapped to streaming DMA

2020-10-18 Thread Jia-Ju Bai
t;frame_control is accessed on line 535: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx

[PATCH] rtl8192de: avoid accessing the data mapped to streaming DMA

2020-10-18 Thread Jia-Ju Bai
rol is accessed on line 670: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx

  1   2   3   4   5   6   7   8   9   10   >