The goto needs to be moved after the assignment.

Signed-off-by: Dan Carpenter <erro...@gmail.com>

diff --git a/drivers/media/dvb/frontends/dib7000p.c 
b/drivers/media/dvb/frontends/dib7000p.c
index a64a538..9c40267 100644
--- a/drivers/media/dvb/frontends/dib7000p.c
+++ b/drivers/media/dvb/frontends/dib7000p.c
@@ -1577,8 +1577,8 @@ int dib7000pc_detection(struct i2c_adapter *i2c_adap)
                return -ENOMEM;
        rx = kzalloc(2*sizeof(u8), GFP_KERNEL);
        if (!rx) {
-               goto rx_memory_error;
                ret = -ENOMEM;
+               goto rx_memory_error;
        }
 
        msg[0].buf = tx;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to