@@ -268,21 +268,27 @@ static u8 *iwl_get_pnvm_image(struct iwl_trans *trans_p, size_t *len)
268
268
struct pnvm_sku_package * package ;
269
269
u8 * image = NULL ;
270
270
271
- /* First attempt to get the PNVM from BIOS */
272
- package = iwl_uefi_get_pnvm (trans_p , len );
273
- if (!IS_ERR_OR_NULL (package )) {
274
- if (* len >= sizeof (* package )) {
275
- /* we need only the data */
276
- * len -= sizeof (* package );
277
- image = kmemdup (package -> data , * len , GFP_KERNEL );
271
+ /* Get PNVM from BIOS for non-Intel SKU */
272
+ if (trans_p -> sku_id [2 ]) {
273
+ package = iwl_uefi_get_pnvm (trans_p , len );
274
+ if (!IS_ERR_OR_NULL (package )) {
275
+ if (* len >= sizeof (* package )) {
276
+ /* we need only the data */
277
+ * len -= sizeof (* package );
278
+ image = kmemdup (package -> data ,
279
+ * len , GFP_KERNEL );
280
+ }
281
+ /*
282
+ * free package regardless of whether kmemdup
283
+ * succeeded
284
+ */
285
+ kfree (package );
286
+ if (image )
287
+ return image ;
278
288
}
279
- /* free package regardless of whether kmemdup succeeded */
280
- kfree (package );
281
- if (image )
282
- return image ;
283
289
}
284
290
285
- /* If it's not available, try from the filesystem */
291
+ /* If it's not available, or for Intel SKU, try from the filesystem */
286
292
if (iwl_pnvm_get_from_fs (trans_p , & image , len ))
287
293
return NULL ;
288
294
return image ;
0 commit comments