It is not a problem. I have done exactly this several times in the reverse direction, but it is equally fine northbound. Once I did a day trip to the US from Canada on a Monday, then entered for a three-week holiday on the Thursday of the same week. On another trip we spent several days in the US driving east toward Detroit, then crossed back into Canada, spent a week and a half in Toronto and Ottawa, and crossed back into the U.S. at Sault Ste. Marie, ON/MI and returned home to Saskatchewan that way. Neither time was it an issue.
The only thing to watch: personal exemptions for imported items are based on the length of the current out-of-country travel. For example, Canadians get an CAD$800 exemption after 48 hours, and I believe Americans get a US$800 exemption after 48 hours. If you are out of the country for less than 48 hours, you would not be eligible for this exemption, even if your two foreign stays together exceed 48 hours. (On the other hand, if both trips exceeded 48 hours, you'd get the exemption twice, once for each leg of the trip.)