The code does not recognize the notion of a "sub panel." 408.36 says that a panelboard (i.e., your 30 amp "sub panel") must have overcurrent protection of a value not greater than the rating of the panelboard. It goes on to say the overcurrent device can be within, or at any point upstream of, the panelboard. So as long as there is a breaker in the main panel serving the sub panel, and as long as that breaker is not higher than 30 amps, you satisfy the requirement.
Please note that it is important that the garage is "attached." You have a single building, and are not feeding one building from a separate building. If the garage were detached, then 225.31 and 225.32 would require a separate disconnecting means for the feeder from the garage to the sub panel. That need not be an overcurrent device; a non-fused disconnect would suffice. However, you would still need overcurrent protection, and the breaker in the garage panel would still suffice for that purpose.