Mobile Laptop or Phone Charger?
Laptops are around 21 Volts
Mobile Phone are 5 Volts
Hard Drives are 12V if the larger desktop drives in an inclosure
Laptop Hard Drives Run on USB power and/or With external 5 Volt power
(1+ amp draw varies on brand)
So check the output voltage of the power device and Amps it supplies
Caution You don't want to be charging Your Laptop USB with a "Y" Cable its use is to plug into 2 USB ports to draw more power from your laptop which is typical of some laptop powered HDD requiring more power than just from 1 USB
If your HDD has a separate power input than yes if your voltage and amps are within range of spec it should be fine.