spi: allow registering empty spi_board_info lists
[sfrench/cifs-2.6.git] / drivers / spi / spi.c
index 6cc86060d22f005400bb5dcfb4bb4b91d4952596..f699ea530b88e6c0bbd24450185a3e140a76a15e 100644 (file)
@@ -690,7 +690,7 @@ int spi_register_board_info(struct spi_board_info const *info, unsigned n)
        int i;
 
        if (!n)
-               return -EINVAL;
+               return 0;
 
        bi = kcalloc(n, sizeof(*bi), GFP_KERNEL);
        if (!bi)