struct v4l2_subdev_format *format)
 {
        struct mipid02_dev *bridge = to_mipid02_dev(sd);
+       struct v4l2_subdev_format source_fmt;
        struct v4l2_mbus_framefmt *fmt;
 
        format->format.code = get_fmt_code(format->format.code);
 
        *fmt = format->format;
 
-       /* Propagate the format change to the source pad */
-       mipid02_set_fmt_source(sd, sd_state, format);
+       /*
+        * Propagate the format change to the source pad, taking
+        * care not to update the format pointer given back to user
+        */
+       source_fmt = *format;
+       mipid02_set_fmt_source(sd, sd_state, &source_fmt);
 }
 
 static int mipid02_set_fmt(struct v4l2_subdev *sd,