Merge tag 'mips_5.18_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[linux-2.6-microblaze.git] / arch / mips / lantiq / xway / gptu.c
index 3d5683e..200fe9f 100644 (file)
@@ -122,6 +122,8 @@ static inline void clkdev_add_gptu(struct device *dev, const char *con,
 {
        struct clk *clk = kzalloc(sizeof(struct clk), GFP_KERNEL);
 
+       if (!clk)
+               return;
        clk->cl.dev_id = dev_name(dev);
        clk->cl.con_id = con;
        clk->cl.clk = clk;