fastboot: block: fix wrong device pointer check
PATCH 1/1 fastboot: block: fix wrong device pointer check
Check the block device returned by blk_get_dev() instead of the pointer to where it is stored, which is never NULL, so that a missing device is reported to the host instead of being dereferenced later.
--- drivers/fastboot/fb_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fastboot/fb_block.c +1 -1
@@ -147,7 +147,7 @@ int fastboot_block_get_part_info(const char *part_name, } *dev_desc =blk_get_dev (interface, device); -if (!dev_desc) { +if (!*dev_desc) {fastboot_fail ("no such device" , response);return -ENODEV ; }
---
base-commit: 6201222134cd704b5717211fc917e2ca6263577a
base-tree: https://git.u-boot-project.org/u-boot/u-boot.git next
change-id: 20261117-fastboot-block-check-dev-c55137e546c0
Best regards,
Signature · 1 line
David Lechner <[email protected]>
On Tue, 17 Nov 2026 18:08:01 -0600, David Lechner <[email protected]> wrote:
Hi David,
this patch is already part of an other serie :
https://lore.kernel.org/u-boot/[email protected]/
sent before you so probably be better to use QCOM patch and put you review on it.
what do you think ?
Guillaume
Signature · 1 line
Guillaume La Roque <[email protected]>
Quoted 6 lines · Guillaume La Roque
On Tue, 17 Nov 2026 18:08:01 -0600, David Lechner <[email protected]> wrote:
Hi David,
this patch is already part of an other serie :
https://lore.kernel.org/u-boot/[email protected]/
Thanks. I didn't see that one before.
Quoted 5 lines
sent before you so probably be better to use QCOM patch and put you review on it.
what do you think ?
Of course. :-)
Quoted 3 lines
Guillaume