diff --git a/include/linux/pio_rp1.h b/include/linux/pio_rp1.h index dabe7851776dc..0e5cc97a6eb7d 100644 --- a/include/linux/pio_rp1.h +++ b/include/linux/pio_rp1.h @@ -20,7 +20,7 @@ #endif #define bad_params_if(client, test) \ - ({ bool f = (test); if (f) pio_set_error(client, -EINVAL); \ + ({ bool f = (test); if (f && client) pio_set_error(client, -EINVAL); \ if (f && PARAM_WARNINGS_ENABLED) WARN_ON((test)); \ f; })