hal_ring: fix NULL check after dereference
hal_ring: fix NULL check after dereference

strahlex/machinekit,strahlex/machinekit,strahlex/machinekit,strahlex/machinekit,strahlex/machinekit,strahlex/machinekit,strahlex/machinekit