kernel/drivers/fpga/stratix10-soc.c
.. .. @@ -213,9 +213,9 @@ 213 213 /* Allocate buffers from the service layer's pool. */ 214 214 for (i = 0; i < NUM_SVC_BUFS; i++) { 215 215 kbuf = stratix10_svc_allocate_memory(priv->chan, SVC_BUF_SIZE); 216 - if (!kbuf) {216 + if (IS_ERR(kbuf)) {217 217 s10_free_buffers(mgr); 218 - ret = -ENOMEM;218 + ret = PTR_ERR(kbuf);219 219 goto init_done; 220 220 } 221 221