What happened

Camping World Holdings (CWH 0.22%) shares had jumped by 18% as of 11:55 a.m. ET Wednesday, compared to a 1.2% rise in the broad market S&P 500 index. That surge erased some of the decline that its shareholders have endured since the start of the year, but the RV giant's stock remains down by more than 20% so far in 2022.

The rally was powered by a positive earnings report that was well received on Wall Street.

So what

Camping World sold 39,000 new and used RVs in the second quarter. That helped push its revenue up 5% to $2.2 billion, a record for the business.

CEO Marcus Lemonis credited the company's diverse portfolio and strong market position for keeping revenue rising in a volatile industry. "We believe our team has both the focus and experience to navigate our business through changes in market conditions," Lemonis said in the earnings press release, "as evidenced by our solid financial results."

Average selling prices rose significantly, and that increase helped offset a slight drop in new RV sales volume. Camping World faced major cost pressures, though, from inflation, higher wages, and increased supply chain expenses. Its gross profit margin fell to 33% of sales from 37% of sales a year ago.

Now what

Like peers such as Winnebago, Camping World is attempting to walk a fine line: It wants to meet consumer demand for its RVs without building up too much inventory in the event that demand drops sharply. The Q2 update suggests that such a downturn in demand hasn't materialized.

Still, the company's inventory jumped this quarter, and investors will want to keep a close eye on that metric. Ideally, Camping World will be able to keep pushing revenues higher through a combination of rising prices and steady sales volumes, as it did in Q2. That would be the surest path toward steady earnings growth for this consumer discretionary company.