[PATCH 1/8] disk: Drop always true conditional check

Tom Rini trini at konsulko.com
Wed Aug 23 16:42:01 CEST 2023


On Mon, Aug 14, 2023 at 01:46:41AM +0200, Marek Vasut wrote:

> if (device_get_uclass_id(dev) == UCLASS_PARTITION) is always
> true, because this disk_blk_read() function calls dev_get_blk()
> above and checks its return value for non-NULL. The dev_get_blk()
> performs the same device_get_uclass_id(dev) check and returns NULL
> if not UCLASS_PARTITION. Drop the duplicate check.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230823/244614d5/attachment.sig>


More information about the U-Boot mailing list