Not every investment that Warren Buffett and Berkshire Hathaway (BRK.B -0.69%) (BRK.A -0.76%) make is a slam dunk. Like all investors, Buffett makes mistakes.

In April 2022, Berkshire purchased a multibillion-dollar stake in HP (HPQ -0.46%). Buffett and company added to that stake a few months later, pushing its ownership to about 12.3% of outstanding shares.

While Buffett is known to hold some stocks for decades, HP doesn't appear to be one of them. In a Securities and Exchange Commission (SEC) filing on Wednesday, Berkshire disclosed that it had sold about $158 million worth of HP stock. This move brought its stake down to $3.27 billion.

Buffett's foray into the world of PCs and printers has not gone well. Since peaking in mid-2022, shares of HP are down nearly 30%. The stock looked cheap when Buffett bought it, and it still looks cheap now. But looks can be deceiving.

Where's the growth story?

Buffett bought HP right before the PC market began to crumble. Global PC shipments dropped 5.1% year over year in the first quarter of 2022, according to IDC, following a two-year period of incredible growth. This marked the beginning of one of the worst downturns the industry has ever seen.

To be fair, no one expected PC sales to crash so suddenly. IDC noted that the decline in shipments "doesn't mean the industry is in a downward spiral." That view turned out to be wrong.

Period

Global PC shipment growth (YOY)

Q2 2022

(5.1%)

Q3 2022

(15.0%)

Q4 2022

(28.1%)

Q1 2023

(29.0%)

Q2 2023

(13.4%)

Data source: IDC. YOY = year over year.

Weak demand from consumers and businesses coupled with excess inventory quickly brought PC shipments below pre-pandemic levels. While HP has cut costs and prevented its operating margin in the PC segment from falling too far, the PC business is unlikely to be a source of growth in the long run. Shipments will bounce back to a degree once inventories are cleared, but there's little reason to expect anything other than sluggish growth once the dust settles.

Printing is HP's other core business, and the growth picture looks even worse there. The printing industry has been declining for years as consumers and businesses find fewer reasons to print. HP makes a killing on printing supplies like ink, pushing the segment operating margin to just shy of 20%. But wringing out profits from a dying industry is a strategy that only works for so long.

Taken together, it's hard to be excited about HP's PC and printing businesses. Cost-cutting can help prop up profits, but that will only take the company so far.

Cheap for a reason

HP expects to generate $3 billion in free cash flow this year, an outlook that makes the stock look cheap. With a market capitalization of about $28 billion, HP trades for less than 10 times that all-important cash-flow metric.

If HP were capable of consistently growing its free cash flow in the long run, the stock would be a bargain. But with both the PC and printing businesses struggling, it's hard to see a path to significantly higher free cash flow in the years ahead.

HP has also made the mistake that many companies seem to make: Burning cash on share buybacks when times are good. In the past year, HP's net debt has risen from $5.8 billion to $8.1 billion as the company embarked on a multibillion-dollar buyback program. HP is now more fragile and less nimble as it faces the worst demand environment in years.

While Berkshire remains a major shareholder in HP, it wouldn't be surprising to see further stock sales as the company unwinds its bet on the PC and printing giant.