This cannot be correct. It is only correct when the cylinder is massless. Consider the case where the cylinder is much more massive than the attached mass - the acceleration will be much lower due to the torque needed to accelerate the rotation of the cylinder. Your result must depend on the ratio of masses. It seems to me that you are ignoring how the cylinder and hanging mass are affecting each other through the tension in the string.